File size: 4,695 Bytes
2bdb1e3 a2822a3 2bdb1e3 a2822a3 2bdb1e3 a2822a3 2bdb1e3 a2822a3 06a3b81 2bdb1e3 a2822a3 2bdb1e3 a2822a3 2bdb1e3 a2822a3 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 | ---
license: mit
base_model: microsoft/phi-4
tags:
- fine-tuned
- full-fine-tune
- text-generation
- chat
- question-answering
- assistant
- pytorch
language:
- fa
- en
- multilingual
pipeline_tag: text-generation
---
# 🍵 Tea

**Tea** is a full fine-tune of [`microsoft/phi-4`](https://huggingface.co/microsoft/phi-4), built for **question answering and long, sustained assistant-style conversations**. It is multilingual, with fine-tuning focused on strong, natural **Farsi (Persian)** conversational ability, while retaining Phi-4's general English and multilingual competence.
## Model Details
- **Base model:** [microsoft/phi-4](https://huggingface.co/microsoft/phi-4) (14B parameters)
- **Fine-tuning method:** Full fine-tune — all parameters updated, no LoRA/PEFT adapters
- **Fine-tuned by:** [artindnr](https://huggingface.co/artindnr)
- **License:** MIT
- **Languages:** Farsi (primary conversational focus), English, and general multilingual support
- **Model type:** Causal decoder-only chat/assistant language model
## What's New
tea takes Phi-4's strong base reasoning and language capabilities and tunes them specifically for:
- **Question answering** — direct, accurate answers grounded in the conversation context
- **Long assistant conversations** — maintaining coherence, tone, and context over extended multi-turn sessions rather than short single-shot exchanges
- **Farsi fluency** — natural, idiomatic Persian conversation and assistance, alongside solid English and multilingual performance
Unlike adapter-based fine-tunes, every weight in the model was updated during training, which the author has found gives more consistent behavior for long-conversation use cases than LoRA-based approaches.
## How to Use
Tea uses the standard chat template shipped with the base model, so it works out of the box with 🤗 Transformers.
### Generation
```python
import torch
from transformers import AutoModelForCausalLM, AutoTokenizer
MODEL_ID = "artindnr/tea"
tokenizer = AutoTokenizer.from_pretrained(MODEL_ID)
model = AutoModelForCausalLM.from_pretrained(
MODEL_ID,
torch_dtype=torch.bfloat16,
device_map="auto",
)
USER_PROMPT = "تو کی هستی و اسمت چیه؟"
messages = [
{"role": "user", "content": USER_PROMPT},
]
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=1024,
temperature=0.7,
do_sample=True,
)
print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:], skip_special_tokens=True))
```
For multi-turn conversations, simply keep appending `{"role": "user", ...}` / `{"role": "assistant", ...}` turns to the `messages` list before re-applying the chat template — tea is tuned to stay coherent as this history grows.
## Intended Use
tea is intended for:
- Farsi-first conversational assistants that also need to handle English/multilingual input
- Question-answering applications requiring direct, grounded answers
- Long-running, multi-turn assistant deployments (support bots, tutoring, general-purpose chat) where conversational memory and coherence over many turns matters
- Research comparing full fine-tunes vs. adapter-based (LoRA) fine-tunes on the same base model
## Limitations
- As a full fine-tune, tea's Farsi-focused training may shift some of Phi-4's original English-centric behaviors; for English-only, general-purpose use cases the base `microsoft/phi-4` model may still be preferable.
- tea inherits the general capabilities and limitations of the `phi-4` base model, including the possibility of hallucinated facts, especially over very long contexts.
- No formal safety fine-tuning beyond what is inherited from the base model has been applied; use appropriate safeguards in production settings.
## License
This model is released under the [MIT License](https://opensource.org/licenses/MIT), consistent with the base `microsoft/phi-4` model.
## Citation
If you use tea in your work, please cite:
```bibtex
@misc{tea,
title = {tea: A Farsi-Focused, Full Fine-tune of Phi-4 for QA and Long-form Assistance},
author = {artindnr},
year = {2026},
url = {https://huggingface.co/artindnr/tea}
}
```
## Acknowledgements
Built on top of [`microsoft/phi-4`](https://huggingface.co/microsoft/phi-4). |