Instructions to use QuantFactory/eai-distill-0.5b-GGUF with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- llama-cpp-python
How to use QuantFactory/eai-distill-0.5b-GGUF with llama-cpp-python:
# !pip install llama-cpp-python from llama_cpp import Llama llm = Llama.from_pretrained( repo_id="QuantFactory/eai-distill-0.5b-GGUF", filename="eai-distill-0.5b.Q2_K.gguf", )
llm.create_chat_completion( messages = "No input example has been defined for this model task." )
- Notebooks
- Google Colab
- Kaggle
- Local Apps
- llama.cpp
How to use QuantFactory/eai-distill-0.5b-GGUF with llama.cpp:
Install from brew
brew install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama-server -hf QuantFactory/eai-distill-0.5b-GGUF:Q4_K_M # Run inference directly in the terminal: llama-cli -hf QuantFactory/eai-distill-0.5b-GGUF:Q4_K_M
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama-server -hf QuantFactory/eai-distill-0.5b-GGUF:Q4_K_M # Run inference directly in the terminal: llama-cli -hf QuantFactory/eai-distill-0.5b-GGUF:Q4_K_M
Use pre-built binary
# Download pre-built binary from: # https://github.com/ggerganov/llama.cpp/releases # Start a local OpenAI-compatible server with a web UI: ./llama-server -hf QuantFactory/eai-distill-0.5b-GGUF:Q4_K_M # Run inference directly in the terminal: ./llama-cli -hf QuantFactory/eai-distill-0.5b-GGUF:Q4_K_M
Build from source code
git clone https://github.com/ggerganov/llama.cpp.git cd llama.cpp cmake -B build cmake --build build -j --target llama-server llama-cli # Start a local OpenAI-compatible server with a web UI: ./build/bin/llama-server -hf QuantFactory/eai-distill-0.5b-GGUF:Q4_K_M # Run inference directly in the terminal: ./build/bin/llama-cli -hf QuantFactory/eai-distill-0.5b-GGUF:Q4_K_M
Use Docker
docker model run hf.co/QuantFactory/eai-distill-0.5b-GGUF:Q4_K_M
- LM Studio
- Jan
- Ollama
How to use QuantFactory/eai-distill-0.5b-GGUF with Ollama:
ollama run hf.co/QuantFactory/eai-distill-0.5b-GGUF:Q4_K_M
- Unsloth Studio new
How to use QuantFactory/eai-distill-0.5b-GGUF with Unsloth Studio:
Install Unsloth Studio (macOS, Linux, WSL)
curl -fsSL https://unsloth.ai/install.sh | sh # Run unsloth studio unsloth studio -H 0.0.0.0 -p 8888 # Then open http://localhost:8888 in your browser # Search for QuantFactory/eai-distill-0.5b-GGUF to start chatting
Install Unsloth Studio (Windows)
irm https://unsloth.ai/install.ps1 | iex # Run unsloth studio unsloth studio -H 0.0.0.0 -p 8888 # Then open http://localhost:8888 in your browser # Search for QuantFactory/eai-distill-0.5b-GGUF to start chatting
Using HuggingFace Spaces for Unsloth
# No setup required # Open https://huggingface.co/spaces/unsloth/studio in your browser # Search for QuantFactory/eai-distill-0.5b-GGUF to start chatting
- Pi new
How to use QuantFactory/eai-distill-0.5b-GGUF with Pi:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama-server -hf QuantFactory/eai-distill-0.5b-GGUF:Q4_K_M
Configure the model in Pi
# Install Pi: npm install -g @mariozechner/pi-coding-agent # Add to ~/.pi/agent/models.json: { "providers": { "llama-cpp": { "baseUrl": "http://localhost:8080/v1", "api": "openai-completions", "apiKey": "none", "models": [ { "id": "QuantFactory/eai-distill-0.5b-GGUF:Q4_K_M" } ] } } }Run Pi
# Start Pi in your project directory: pi
- Hermes Agent new
How to use QuantFactory/eai-distill-0.5b-GGUF with Hermes Agent:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama-server -hf QuantFactory/eai-distill-0.5b-GGUF:Q4_K_M
Configure Hermes
# Install Hermes: curl -fsSL https://hermes-agent.nousresearch.com/install.sh | bash hermes setup # Point Hermes at the local server: hermes config set model.provider custom hermes config set model.base_url http://127.0.0.1:8080/v1 hermes config set model.default QuantFactory/eai-distill-0.5b-GGUF:Q4_K_M
Run Hermes
hermes
- Docker Model Runner
How to use QuantFactory/eai-distill-0.5b-GGUF with Docker Model Runner:
docker model run hf.co/QuantFactory/eai-distill-0.5b-GGUF:Q4_K_M
- Lemonade
How to use QuantFactory/eai-distill-0.5b-GGUF with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull QuantFactory/eai-distill-0.5b-GGUF:Q4_K_M
Run and chat with the model
lemonade run user.eai-distill-0.5b-GGUF-Q4_K_M
List all available models
lemonade list
llm.create_chat_completion(
messages = "No input example has been defined for this model task."
)QuantFactory/eai-distill-0.5b-GGUF
This is quantized version of EssentialAI/eai-distill-0.5b created using llama.cpp
Original Model Card
π·οΈ EAI-Distill-0.5b
π Website | π₯οΈ Code | π Paper
π Model Description
EAI-Distill-0.5b is a fine-tuned version of Qwen2.5-0.5B-Instruct designed for document classification across 12 taxonomic categories. This model is optimized for high-throughput classification of web documents and produces structured metadata for large-scale dataset curation.
The model classifies documents across the following dimensions:
- π Free Decimal Correspondence (FDC): Subject matter classification based on the Dewey Decimal System
- π§ Bloom's Taxonomy: Cognitive process (Remember/Understand/Apply/Analyze/Evaluate/Create) and knowledge domain (Factual/Conceptual/Procedural/Metacognitive)
- π Document Type: Web page categorization (News, Academic, Reference, Code, Social, etc.)
- π Content Quality: Extraction artifacts, missing content detection
- π Educational Metadata: Reasoning depth, technical correctness, educational level
π Training Details
- π€ Base Model: Qwen2.5-0.5B-Instruct
- π Training Data: 82B synthetic tokens generated by Qwen2.5-32B-Instruct (teacher model) on 104M Common Crawl documents
- βοΈ Optimizer: AdamW (Ξ²β=0.9, Ξ²β=0.95, weight_decay=0.1)
- π Learning Rate: 1Γ10β»β΄ with linear warmup (2B tokens), cosine decay to 1Γ10β»β΅, then linear anneal to 0
- π¦ Batch Size: 2M tokens
- π Sequence Length: 16,384 tokens
- π» Hardware: Trained on AMD MI300x GPUs
π Performance
The model achieves an average Cohen's ΞΊ agreement of 0.71-0.74 with our golden annotators, GPT-4o and Claude 3.5 Sonnet, on held-out evaluation sets, which is within 3% of its teacher model Qwen2.5-32b-Instruct while being 64Γ smaller.
π» Usage
from transformers import AutoTokenizer, AutoModelForCausalLM
import random
# Load model and tokenizer
tokenizer = AutoTokenizer.from_pretrained("EssentialAI/EAI-Distill-0.5b", trust_remote_code=True)
model = AutoModelForCausalLM.from_pretrained("EssentialAI/EAI-Distill-0.5b")
def chunk_text(text, max_char_per_doc=30000):
if len(text) <= max_char_per_doc:
return text
chunk_size = max_char_per_doc // 3
start = text[:chunk_size]
middle_start = chunk_size
middle_end = len(text) - chunk_size
mid_point = random.randint(middle_start + chunk_size//2, middle_end - chunk_size//2)
middle = text[mid_point - chunk_size//2:mid_point + chunk_size//2]
end = text[-chunk_size:]
return f"[beginning]\n{start}\n[middle]\n{middle}\n[end]\n{end}"
def classify_document(text):
chunked_text = chunk_text(text)
messages = [
{"role": "system", "content": "taxonomy"},
{"role": "user", "content": chunked_text},
]
prompt = tokenizer.apply_chat_template(
messages,
tokenize=False,
add_generation_prompt=True
)
inputs = tokenizer(prompt, return_tensors="pt")
outputs = model.generate(**inputs, max_new_tokens=100)
return tokenizer.decode(outputs[0], skip_special_tokens=True)
# Example usage
document_text = "Your document content here..."
classification = classify_document(document_text)
print(classification)
π€ Output Format
The model outputs classifications in a condensed format:
{FDC primary},{FDC secondary or skip}
{Bloom cognitive process primary (1-6)},{Bloom cognitive process secondary (1-6) or skip}
{Bloom knowledge domain primary (1-4)},{Bloom knowledge domain secondary (1-4) or skip}
{Document type v1 primary (1-17)},{Document type v1 secondary (1-17) or skip}
{Extraction artifacts primary (0-4)},{Extraction artifacts secondary (0-4) or skip}
{Missing content primary (0-6)},{Missing content secondary (0-6) or skip}
{Document type v2 primary (1-25)},{Document type v2 secondary (1-25) or skip}
{Reasoning depth primary (1-6)},{Reasoning depth secondary (1-6) or skip}
{Technical correctness primary (1-6)},{Technical correctness secondary (1-6) or skip}
{Educational level primary (1-5)},{Educational level secondary (1-5) or skip}
π― Intended Use
This model is designed for:
- ποΈ Large-scale web document classification and metadata generation
- π§ Dataset curation through taxonomic filtering
- β Content quality assessment for training data preparation
- π Educational content analysis and organization
β οΈ Limitations
- Optimized for English web documents extracted using resiliparse
- Documents over 30k characters are automatically chunked, which may affect classification accuracy
- Performance may vary on content significantly different from Common Crawl web data
- Classification categories are based on web content patterns and may not generalize to other document types
π Citation
If you use this model, please cite:
@misc{ai2025essentialwebv1024ttokens,
title={Essential-Web v1.0: 24T tokens of organized web data},
author={Essential AI and : and Andrew Hojel and Michael Pust and Tim Romanski and Yash Vanjani and Ritvik Kapila and Mohit Parmar and Adarsh Chaluvaraju and Alok Tripathy and Anil Thomas and Ashish Tanwer and Darsh J Shah and Ishaan Shah and Karl Stratos and Khoi Nguyen and Kurt Smith and Michael Callahan and Peter Rushton and Philip Monk and Platon Mazarakis and Saad Jamal and Saurabh Srivastava and Somanshu Singla and Ashish Vaswani},
year={2025},
eprint={2506.14111},
archivePrefix={arXiv},
primaryClass={cs.CL},
url={https://arxiv.org/abs/2506.14111},
}
- Downloads last month
- 225
2-bit
3-bit
4-bit
5-bit
6-bit
8-bit
# !pip install llama-cpp-python from llama_cpp import Llama llm = Llama.from_pretrained( repo_id="QuantFactory/eai-distill-0.5b-GGUF", filename="", )