Downloads · 30 days
234
2% of all-time downloads
RichardErkhov/jinaai_-_reader-lm-1.5b-gguf
jinaai_-_reader-lm-1.5b-gguf is a machine learning model from RichardErkhov. Use it for the machine learning task on the model card, and read the license before you ship it in a product.
Downloads · 30 days
234
2% of all-time downloads
All-time downloads
11K
Public
Repo size
18.6 GB
Likes
3
Public
Click a slice to open those files.
.gguf21.5 GB · 100%
From the Hugging Face model README
Quantization made by Richard Erkhov.
reader-lm-1.5b - GGUF
| Name | Quant method | Size |
|---|---|---|
| reader-lm-1.5b.Q2_K.gguf | Q2_K | 0.63GB |
| reader-lm-1.5b.IQ3_XS.gguf | IQ3_XS | 0.68GB |
| reader-lm-1.5b.IQ3_S.gguf | IQ3_S | 0.71GB |
| reader-lm-1.5b.Q3_K_S.gguf | Q3_K_S | 0.71GB |
| reader-lm-1.5b.IQ3_M.gguf | IQ3_M | 0.72GB |
| reader-lm-1.5b.Q3_K.gguf | Q3_K | 0.77GB |
| reader-lm-1.5b.Q3_K_M.gguf | Q3_K_M | 0.77GB |
| reader-lm-1.5b.Q3_K_L.gguf | Q3_K_L | 0.82GB |
| reader-lm-1.5b.IQ4_XS.gguf | IQ4_XS | 0.84GB |
| reader-lm-1.5b.Q4_0.gguf | Q4_0 | 0.87GB |
| reader-lm-1.5b.IQ4_NL.gguf | IQ4_NL | 0.88GB |
| reader-lm-1.5b.Q4_K_S.gguf | Q4_K_S | 0.88GB |
| reader-lm-1.5b.Q4_K.gguf | Q4_K | 0.92GB |
| reader-lm-1.5b.Q4_K_M.gguf | Q4_K_M | 0.92GB |
| reader-lm-1.5b.Q4_1.gguf | Q4_1 | 0.95GB |
| reader-lm-1.5b.Q5_0.gguf | Q5_0 | 1.02GB |
| reader-lm-1.5b.Q5_K_S.gguf | Q5_K_S | 1.02GB |
| reader-lm-1.5b.Q5_K.gguf | Q5_K | 1.05GB |
| reader-lm-1.5b.Q5_K_M.gguf | Q5_K_M | 1.05GB |
| reader-lm-1.5b.Q5_1.gguf | Q5_1 | 1.1GB |
| reader-lm-1.5b.Q6_K.gguf | Q6_K | 1.19GB |
| reader-lm-1.5b.Q8_0.gguf | Q8_0 | 1.53GB |
pipeline_tag: text-generation language:
<br><br>
<p align="center"> <img src="https://aeiljuispo.cloudimg.io/v7/https://cdn-uploads.huggingface.co/production/uploads/603763514de52ff951d89793/AFoybzd5lpBQXEBrQHuTt.png?w=200&h=200&f=face" alt="Finetuner logo: Finetuner helps you to create experiments in order to improve embeddings on search tasks. It accompanies you to deliver the last mile of performance-tuning for neural search applications." width="150px"> </p> <p align="center"> <b>Trained by <a href="https://jina.ai/"><b>Jina AI</b></a>.</b> </p>Jina Reader-LM is a series of models that convert HTML content to Markdown content, which is useful for content conversion tasks. The model is trained on a curated collection of HTML content and its corresponding Markdown content.
| Name | Context Length | Download |
|---|---|---|
| reader-lm-0.5b | 256K | 🤗 Hugging Face |
| reader-lm-1.5b | 256K | 🤗 Hugging Face |
The easiest way to experience reader-lm is by running our Colab notebook, where we demonstrate how to use reader-lm-1.5b to convert the HackerNews website into markdown. The notebook is optimized to run smoothly on Google Colab’s free T4 GPU tier. You can also load reader-lm-0.5b or change the URL to any website and explore the output. Note that the input (i.e., the prompt) to the model is the raw HTML—no prefix instruction is required.
To use this model, you need to install transformers:
pip install transformers<=4.43.4
Then, you can use the model as follows:
# pip install transformers
from transformers import AutoModelForCausalLM, AutoTokenizer
checkpoint = "jinaai/reader-lm-1.5b"
device = "cuda" # for GPU usage or "cpu" for CPU usage
tokenizer = AutoTokenizer.from_pretrained(checkpoint)
model = AutoModelForCausalLM.from_pretrained(checkpoint).to(device)
# example html content
html_content = "<html><body><h1>Hello, world!</h1></body></html>"
messages = [{"role": "user", "content": html_content}]
input_text=tokenizer.apply_chat_template(messages, tokenize=False)
print(input_text)
inputs = tokenizer.encode(input_text, return_tensors="pt").to(device)
outputs = model.generate(inputs, max_new_tokens=1024, temperature=0, do_sample=False, repetition_penalty=1.08)
print(tokenizer.decode(outputs[0]))