Jina Reader-LM
Collection
Convert HTML content to LLM-friendly Markdown/JSON content • 3 items • Updated • 1
Run mlx-community/jinaai-ReaderLM-v2 on Hugging Face's managed compute, monitor its progress, and retrieve the results when it's done.
Paste one of these prompts into your coding agent:
Use HF Jobs to fine-tune https://huggingface.co/mlx-community/jinaai-ReaderLM-v2. Ask me which dataset to train on, then push the fine-tuned model to a new model repo. Run `hf jobs --help` first to learn the CLI.
Use HF Jobs to run batch inference with https://huggingface.co/mlx-community/jinaai-ReaderLM-v2 on the inputs in a mounted HF Bucket. Ask me which Bucket to use, then write the outputs back to it and keep each input ID. Run `hf jobs --help` first to learn the CLI.
How to use mlx-community/jinaai-ReaderLM-v2 with MLX:
# Download the model from the Hub pip install huggingface_hub[hf_xet] hf download mlx-community/jinaai-ReaderLM-v2 --local-dir jinaai-ReaderLM-v2
pip install mlx-lm
from mlx_lm import load, generate
model, tokenizer = load("mlx-community/jinaai-ReaderLM-v2")
prompt="hello"
if hasattr(tokenizer, "apply_chat_template") and tokenizer.chat_template is not None:
messages = [{"role": "user", "content": prompt}]
prompt = tokenizer.apply_chat_template(
messages, tokenize=False, add_generation_prompt=True
)
response = generate(model, tokenizer, prompt=prompt, verbose=True)
Add Package Dependency in xcode: https://github.com/kunal732/MLX-Model-Manager
import SwiftUI
import MLXModelManager
struct ContentView: View {
@StateObject var JinaManager = ModelManager(modelPath: "mlx-community/jinaai-ReaderLM-v2")
var body: some View {
VStack {
Button("answer prompt"){
Task {
//load model
try await JinaManager.loadModel()
//inference
await JinaManager.generate(
prompt: "convert to markdown: <!DOCTYPE html><html><body><h1>Html Heading One</h1><p>first paragraph.</p></body></html>"
)
}
}
//Model Output
Text(JinaManager.output)
}
.padding()
}
}
4-bit
Base model
jinaai/ReaderLM-v2