Inference (matches eval)
import torch
from transformers import AutoModelForCausalLM, AutoTokenizer
repo = "amirhosseinjpl/jplstar"
tok = AutoTokenizer.from_pretrained(repo)
model = AutoModelForCausalLM.from_pretrained(
repo, torch_dtype=torch.bfloat16, device_map="auto"
)
messages = [
{
"role": "system",
"content": "Translate the following Standard Persian sentence into Abizi dialect.",
},
{"role": "user", "content": "دیشب رفتم مغازه."},
]
prompt = tok.apply_chat_template(messages, tokenize=False, add_generation_prompt=True)
inputs = tok(prompt, return_tensors="pt").to(model.device)
out = model.generate(
**inputs,
max_new_tokens=128,
do_sample=False,
pad_token_id=tok.eos_token_id,
)
print(tok.decode(out[0][inputs.input_ids.shape[1]:], skip_special_tokens=True))
Greedy decoding is what produced the numbers below. Sampling is for the demo Space only.
Splits
Held-out rows were isolated from train-Final. No reverse-pair cut from the same sentence into eval.
Table with columns: split, n, file| split | n | file |
|---|
| train | 10,207 | train-Final.jsonl |
| valid | 30 | valid-Final.jsonl |
| test | 50 | test_data_for_v4 |
Eval
Metric: character overlap (F1 over character bags after yeh/kaf normalize).
Exact match is the wrong headline: Abizi spelling is not stable.
Table with columns: split, exact, overlap| split | exact | overlap |
|---|
| valid | 0/30 | 81.5% |
| test | 0/50 | 85.8% |
Valid is a 30-row file. Do not cite a 50-row file as valid. Test > valid on this metric is compatible with split difficulty and small-n noise. It is not proof of generalization. Human gold-vs-pred is the judge. Overlap is a proxy. Not BLEU.


Train stack
- Base: Qwen2.5-7B-Instruct
- Method: Unsloth QLoRA → merge
- Hardware: 2× NVIDIA T4
- Format: ChatML / instruction routing
Hyperparameters live in the training notebook, not in this card.
Files
- Merged weights in this repo
- Demo Space:
amirhosseinjpl/telisk (loads this model)
License
Apache-2.0 for the fine-tune artifacts, subject to the Qwen2.5-Instruct license of the base.