Instructions to use arxyzan/zaya-3b-it with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use arxyzan/zaya-3b-it with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="arxyzan/zaya-3b-it") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("arxyzan/zaya-3b-it") model = AutoModelForCausalLM.from_pretrained("arxyzan/zaya-3b-it") messages = [ {"role": "user", "content": "Who are you?"}, ] inputs = tokenizer.apply_chat_template( messages, add_generation_prompt=True, tokenize=True, return_dict=True, return_tensors="pt", ).to(model.device) outputs = model.generate(**inputs, max_new_tokens=40) print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - llama-cpp-python
How to use arxyzan/zaya-3b-it with llama-cpp-python:
# !pip install llama-cpp-python from llama_cpp import Llama llm = Llama.from_pretrained( repo_id="arxyzan/zaya-3b-it", filename="llama-3.2-3b-it-fa.gguf", )
llm.create_chat_completion( messages = [ { "role": "user", "content": "What is the capital of France?" } ] ) - Notebooks
- Google Colab
- Kaggle
- Local Apps
- llama.cpp
How to use arxyzan/zaya-3b-it with llama.cpp:
Install from brew
brew install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama-server -hf arxyzan/zaya-3b-it:Q8_0 # Run inference directly in the terminal: llama-cli -hf arxyzan/zaya-3b-it:Q8_0
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama-server -hf arxyzan/zaya-3b-it:Q8_0 # Run inference directly in the terminal: llama-cli -hf arxyzan/zaya-3b-it:Q8_0
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 arxyzan/zaya-3b-it:Q8_0 # Run inference directly in the terminal: ./llama-cli -hf arxyzan/zaya-3b-it:Q8_0
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 arxyzan/zaya-3b-it:Q8_0 # Run inference directly in the terminal: ./build/bin/llama-cli -hf arxyzan/zaya-3b-it:Q8_0
Use Docker
docker model run hf.co/arxyzan/zaya-3b-it:Q8_0
- LM Studio
- Jan
- vLLM
How to use arxyzan/zaya-3b-it with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "arxyzan/zaya-3b-it" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "arxyzan/zaya-3b-it", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/arxyzan/zaya-3b-it:Q8_0
- SGLang
How to use arxyzan/zaya-3b-it with SGLang:
Install from pip and serve model
# Install SGLang from pip: pip install sglang # Start the SGLang server: python3 -m sglang.launch_server \ --model-path "arxyzan/zaya-3b-it" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "arxyzan/zaya-3b-it", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker images
docker run --gpus all \ --shm-size 32g \ -p 30000:30000 \ -v ~/.cache/huggingface:/root/.cache/huggingface \ --env "HF_TOKEN=<secret>" \ --ipc=host \ lmsysorg/sglang:latest \ python3 -m sglang.launch_server \ --model-path "arxyzan/zaya-3b-it" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "arxyzan/zaya-3b-it", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Ollama
How to use arxyzan/zaya-3b-it with Ollama:
ollama run hf.co/arxyzan/zaya-3b-it:Q8_0
- Unsloth Studio new
How to use arxyzan/zaya-3b-it 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 arxyzan/zaya-3b-it 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 arxyzan/zaya-3b-it to start chatting
Using HuggingFace Spaces for Unsloth
# No setup required # Open https://huggingface.co/spaces/unsloth/studio in your browser # Search for arxyzan/zaya-3b-it to start chatting
- Pi new
How to use arxyzan/zaya-3b-it with Pi:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama-server -hf arxyzan/zaya-3b-it:Q8_0
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": "arxyzan/zaya-3b-it:Q8_0" } ] } } }Run Pi
# Start Pi in your project directory: pi
- Hermes Agent new
How to use arxyzan/zaya-3b-it with Hermes Agent:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama-server -hf arxyzan/zaya-3b-it:Q8_0
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 arxyzan/zaya-3b-it:Q8_0
Run Hermes
hermes
- Docker Model Runner
How to use arxyzan/zaya-3b-it with Docker Model Runner:
docker model run hf.co/arxyzan/zaya-3b-it:Q8_0
- Lemonade
How to use arxyzan/zaya-3b-it with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull arxyzan/zaya-3b-it:Q8_0
Run and chat with the model
lemonade run user.zaya-3b-it-Q8_0
List all available models
lemonade list
# !pip install llama-cpp-python
from llama_cpp import Llama
llm = Llama.from_pretrained(
repo_id="arxyzan/zaya-3b-it",
filename="",
)
llm.create_chat_completion(
messages = [
{
"role": "user",
"content": "What is the capital of France?"
}
]
)Zaya 3B Persian
Zaya is a family of lightweight models intended for the Persian language. This repo is the 4B version of the model based on Llama-3.2 3B that has been continually pretrained and instruction-tuned for the Persian language. The model is designed for high-quality Persian language understanding and generation.
Model Details
- Base Model: Llama 3.2 3B Instruct
- Language: Multilingual with a Persian focus
- Parameters: ~3.2 Billion
- Context Length: 128K tokens
Training Procedure
Continual Pretraining:
The base Llama 3.2 3B Instruct checkpoint is continually pretrained on a curated Persian corpus to boost grammar, idiomatic usage, and contextual grounding specific to the language.Instruction Fine-tuning:
Using QLoRA, the continually pretrained checkpoint is instruction-tuned on a high-quality Persian instruction dataset, enabling reliable conversational behavior and task following.SLERP Merge:
The instruction-tuned adapter is merged back with the original Llama 3.2 3B Instruct weights via SLERP (Spherical Linear Interpolation), balancing the strong general reasoning of the base model with the Persian-specialized behaviors learned during fine-tuning.
Intended Use
- Persian language understanding and generation
- Instruction following, chatbots, and classroom assistants in Persian
- Knowledge-grounded question answering and information retrieval applications
Note: While performant for its size, this 3B-class model is not meant to replace larger systems for advanced reasoning or long-horizon planning. It shines where quick, high-quality Persian responses are needed under tight compute budgets.
Usage
Transformers
from transformers import AutoModelForCausalLM, AutoTokenizer
import torch
model_id = "arxyzan/zaya-3b-it"
tokenizer = AutoTokenizer.from_pretrained(model_id)
model = AutoModelForCausalLM.from_pretrained(
model_id,
device_map="auto",
torch_dtype=torch.bfloat16,
)
messages = [
{"role": "system", "content": "You are a helpful assistant intended for the Persian language."},
{"role": "user", "content": "مدلهای زبانی بزرگ چگونه آموزش داده میشوند؟"},
]
inputs = tokenizer.apply_chat_template(
messages,
add_generation_prompt=True,
tokenize=True,
return_tensors="pt",
).to(model.device)
outputs = model.generate(**inputs, max_new_tokens=1024)
print(tokenizer.decode(outputs[0], skip_special_tokens=True))
Llama.cpp
To run the instruct checkpoint with llama.cpp, clone that repository and execute:
./llama-cli -hf arxyzan/zaya-3b-it -p "یک خلاصه از شاهنامه فردوسی بده."
Ollama
Quantized builds (Q4_0 and Q8_0) are shipped directly in this repository for quick use with Ollama:
# Q4_0
ollama run hf.co/arxyzan/zaya-3b-it:Q4_0
# Q8_0
ollama run hf.co/arxyzan/zaya-3b-it:Q8_0
Evaluation
Coming soon! Benchmarks across Persian instruction-following suites and multilingual safety evals will be published here once finalized.
Limitations & Bias
- Bias: Training data drawn from Persian web sources may carry societal or regional biases, which the model can reproduce.
- Hallucination: Despite continual pretraining, the model can output confident but incorrect statements. Always verify critical answers.
- Safety: Without an external guardrail, the model may emit harmful or sensitive content when prompted. Downstream deployments should include moderation layers.
Citation
If you use this model, please cite this repository.
Reach Out
Questions, feedback, or deployment stories are welcome at arxyzan@gmail.com or on Telegram via @arxyzan.
- Downloads last month
- -
# Gated model: Login with a HF token with gated access permission hf auth login