Instructions to use Lythri/Lythri-Tada-4B with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Lythri/Lythri-Tada-4B with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="Lythri/Lythri-Tada-4B") messages = [ { "role": "user", "content": [ {"type": "image", "url": "https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/p-blog/candy.JPG"}, {"type": "text", "text": "What animal is on the candy?"} ] }, ] pipe(text=messages)# pip install -U transformers accelerate # Load model directly from transformers import AutoProcessor, AutoModelForMultimodalLM processor = AutoProcessor.from_pretrained("Lythri/Lythri-Tada-4B") model = AutoModelForMultimodalLM.from_pretrained("Lythri/Lythri-Tada-4B", device_map="auto") messages = [ { "role": "user", "content": [ {"type": "image", "url": "https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/p-blog/candy.JPG"}, {"type": "text", "text": "What animal is on the candy?"} ] }, ] inputs = processor.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=256) print(processor.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use Lythri/Lythri-Tada-4B with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "Lythri/Lythri-Tada-4B" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Lythri/Lythri-Tada-4B", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/Lythri/Lythri-Tada-4B
- SGLang
How to use Lythri/Lythri-Tada-4B 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 "Lythri/Lythri-Tada-4B" \ --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": "Lythri/Lythri-Tada-4B", "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 "Lythri/Lythri-Tada-4B" \ --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": "Lythri/Lythri-Tada-4B", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use Lythri/Lythri-Tada-4B with Docker Model Runner:
docker model run hf.co/Lythri/Lythri-Tada-4B
Hugging Face | ModelScope | Technical Report
Introduction
Lythri-Tada-4B is part of the Lythri 2.0 family. It answers directly without a thinking phase, while reinforce model's emotional understanding.
Compared with the previous-generation Lythri-4B-A2B, Tada brings three main upgrades:
- Stronger instruction following. Tada scores 39.19 on IFEval (prompt-level strict), surpassing even the Lythri-7B-A4B (31.05).
- Better multi-turn conversations. Tada keeps track of earlier context and user requests more consistently over long chats, and carries the emotional thread from turn to turn.
- System prompt support. Unlike Lythri-4B-A2B, Tada follows system prompts, so you can set a persona, tone or rules for your app directly in the system message.
Long-tail knowledge, such as graduate-level science questions, is slightly weaker than Lythri-4B-A2B, while overall performance improves substantially.
Writing Naturalness
On the EQ-Bench Slop Score, which measures how much a model relies on typical AI phrasing (lower is better), Lythri-Tada-4B scores 39.0 and writes more naturally than GPT-4o (47.7) and DeepSeek-R1 (67.9), far ahead of Qwen3-4B (62.2) and Gemma-3-4B (85.2).
General Benchmarks
| Benchmark | Lythri-4B-A2B | Lythri-Tada-4B |
|---|---|---|
| Knowledge | ||
| MMLU | 55.23 | 55.41 |
| ARC-C | 52.99 | 56.57 |
| Reasoning | ||
| HellaSwag | 72.80 | 74.23 |
| General | ||
| SocialIQA | 49.80 | 51.43 |
| Science | ||
| GPQA Diamond | 28.79 | 21.21 |
| Math | ||
| GSM8K | 28.81 | 27.45 |
| Code / Instruction | ||
| HumanEval | 28.66 | 24.39 |
| IFEval | 26.43 | 39.19 |
All benchmarks are evaluated with their official standard settings and the chat template applied, reflecting real-world inference conditions. Lythri-4B-A2B is evaluated with thinking; Lythri-Tada-4B answers directly without thinking.
Quickstart
from transformers import AutoModelForCausalLM, AutoTokenizer
import torch
model_path = "Lythri/Lythri-Tada-4B"
tok = AutoTokenizer.from_pretrained(model_path)
model = AutoModelForCausalLM.from_pretrained(
model_path, dtype=torch.bfloat16, device_map="auto"
)
messages = [{"role": "user", "content": "My friend just lost their job and seems really down. What should I say to them?"}]
chat = tok.apply_chat_template(messages, tokenize=False, add_generation_prompt=True)
inputs = tok(chat, return_tensors="pt", add_special_tokens=False).to(model.device)
with torch.inference_mode():
out = model.generate(
**inputs,
max_new_tokens=1024,
do_sample=True,
temperature=0.8,
top_p=0.95,
eos_token_id=[1, 106],
)
print(tok.decode(out[0][inputs.input_ids.shape[1]:], skip_special_tokens=True))
Recommended Generation Config
generation_config = {
"temperature": 0.8,
"top_p": 0.95,
"top_k": 64,
"max_new_tokens": 1024,
"repetition_penalty": 1.05,
"do_sample": True,
"eos_token_id": [1, 106],
}
out = model.generate(**inputs, **generation_config)
System Prompt (Optional)
Lythri-Tada-4B supports system prompts, which Lythri-4B-A2B does not. It works well without one; to set a persona or rules for your app, add a system message:
messages = [
{"role": "system", "content": "You are Lythri, a warm and caring companion. Reply in the same language as the user."},
{"role": "user", "content": "I had a really rough day at work."},
]
Compute
Lythri-Tada-4B starts from the Gemma4-E2B PT and training on SFT with CoT, followed by instant-reply SFT with multi-turn companion conversations, and online preference optimization on only writing with responses judged by Gemma2-27B.
Limitations
- Lythri is optimized for conversation and emotional understanding, not for math, coding or complex reasoning.
- Lythri is not a substitute for professional mental health support. If you or someone you know is in crisis, please contact local emergency services or a crisis helpline.
- Like all language models, it can produce inaccurate or inappropriate content.
License
Lythri is built on Gemma 4 and is released under the Apache License 2.0.
Citation
@techreport{li2026lythri,
title = {Lythri Technical Report},
author = {Li, Jiawen},
year = {2026},
institution = {Zenodo},
doi = {10.5281/zenodo.23179311},
url = {https://doi.org/10.5281/zenodo.23179311}
}
Support
The whole training process is self-funded. If you like our model, please click a free like — that means a lot to me as a student!
- Downloads last month
- 100
Model tree for Lythri/Lythri-Tada-4B
Collection including Lythri/Lythri-Tada-4B
Evaluation results
- openai/gsm8k · Gsm8k View evaluation results leaderboard 27.45
- Idavidrein/gpqa · Diamond View evaluation results leaderboard 21.21
- LiquidAI/ifstruct-v1.0 · Ifstruct V1 View evaluation results leaderboard 19.3