How to use from
Docker Model Runner
docker model run hf.co/salgr/SalgrAI_2_Pro_Full:F16
Quick Links

SalgrAI-v2-Pro-Full

ะ ัƒััะบะฐั ะฒะตั€ัะธั

Qwen2.5-Coder-0.5B-Instruct fine-tuned on the SalgrAI dialog dataset by one person on a single RTX 3060. It keeps the base model's Python skills and answers in a short, casual, friend-like Russian ("lowercase Telegram Russian"). It is the largest model of the SalgrAI family (494M parameters) and is meant for experiments, demos and learning, not for serious use.

Please read the Limitations section. Almost all of the code and knowledge ability comes from the base model; fine-tuning added the conversational style, Russian replies and knowledge of who it is. Facts outside the training data are mostly wrong, arithmetic is unreliable, and there is no safety tuning of our own.

Model summary

Base model Qwen/Qwen2.5-Coder-0.5B-Instruct (Apache-2.0)
Architecture unchanged: Qwen2 decoder-only, 24 layers, hidden 896, 14 heads (2 KV heads), FFN 4864, vocabulary 151,936, tied embeddings
Parameters 494M (358M of them were fine-tuned, the embedding table was frozen)
Language Russian and English (the base model also knows other languages and programming languages)
Format ChatML without a system message: `<
Developed by Salgr
License Apache-2.0, as the base model (see LICENSE and NOTICE)

Files

File Size What it is
model.safetensors 988 MB weights, bfloat16 (loads with transformers)
pytorch_model.bin 988 MB the same weights as a PyTorch state dict
SalgrAI-v2-Pro-Full-F16.gguf 994 MB GGUF, float16, for llama.cpp
SalgrAI-v2-Pro-Full-Q8_0.gguf 531 MB GGUF, 8-bit: about half the size, the same quality in our tests
config.json, generation_config.json config (unchanged from the base) and the recommended sampling settings
tokenizer.json, vocab.json, merges.txt, tokenizer_config.json the unchanged Qwen tokenizer; tokenizer_config.json carries our chat template
chat_example.py a minimal chat script
LICENSE, NOTICE Apache-2.0 license text of the base model and the modification notice

The weight formats were checked against each other: model.safetensors and pytorch_model.bin give exactly the same logits as the trained model cast to bf16; the F16 GGUF run in llama.cpp reproduces the greedy replies of the fp32 model on 10 of 10 test prompts, Q8_0 on 8 of 10. The prompt tokens are identical in transformers and llama.cpp.

Quick start

Transformers

import torch
from transformers import AutoModelForCausalLM, AutoTokenizer

repo = "YOUR-USERNAME/SalgrAI-v2-Pro-Full"
tok = AutoTokenizer.from_pretrained(repo)
model = AutoModelForCausalLM.from_pretrained(repo, dtype=torch.bfloat16)

messages = [{"role": "user", "content": "ะฟั€ะธะฒะตั‚"}]
inputs = tok.apply_chat_template(messages, add_generation_prompt=True, return_tensors="pt", return_dict=True)
out = model.generate(**inputs)  # sampling settings come from generation_config.json
print(tok.decode(out[0, inputs["input_ids"].shape[1]:], skip_special_tokens=True))

llama.cpp (GGUF)

llama-server -m SalgrAI-v2-Pro-Full-Q8_0.gguf -c 2048 --port 8080
curl http://127.0.0.1:8080/v1/chat/completions -d '{"messages": [{"role": "user", "content": "ะฟั€ะธะฒะตั‚"}], "max_tokens": 200, "temperature": 0.5, "top_k": 40, "top_p": 0.9, "repeat_penalty": 1.1}'

The chat template is embedded in the file. Generation stops by itself at <|im_end|>.

Training

Base. Qwen/Qwen2.5-Coder-0.5B-Instruct. Full fine-tuning in bf16 autocast with the embedding table frozen (it doubles as the output layer): AdamW, learning rate 2e-5 decayed to 10% (cosine, 50 warm-up steps), weight decay 0.01, batch 16, up to 3 epochs, loss on assistant tokens only (about 0.46M tokens of 0.99M per epoch). The checkpoint with the best validation loss, epoch 2 (loss 1.756, perplexity 5.8; the base model scored 3.220 on the same set), is published; epoch 3 overfit (1.938). Training took about 24 minutes.

Data: 18,950 short dialogs (305 more held out for validation):

  • ~9,800 casual conversation dialogs, synthetic, written by Claude Haiku (Anthropic) from a written specification (short replies, a consistent persona, no advice and no excuses);
  • ~3,400 short knowledge dialogs (geography, history, science, mathematics, Russian language and literature, culture, technology), written by Claude Haiku, and ~1,000 examples from small hand-made tables (capitals, authors, dates) and simple arithmetic;
  • ~900 dialogs about programming concepts (Python, HTML, SQL, Git), written by Claude Haiku;
  • ~2,400 "what does this Python code print" examples, generated by a script and answered by actually running the code, and ~570 "write a function" examples (shown twice per epoch) in which every solution was checked by tests;
  • 90 dialogs about the model itself (name, version, creator, size, and that it is based on Qwen2.5-Coder), shown 4 times per epoch. The dialogs are not released with the model.

Benchmark leakage control. Dialogs whose first message matched a question of our benchmarks (SBB, SBKCB) word for word were removed. For knowledge data, dialogs sharing two or more content words with a knowledge question of the benchmarks, or containing its expected answer, were also removed (about a quarter of the knowledge dialogs). The code-task data are of the same types as the coding questions of SBKCB ("write a function", "what does this code print"), only not the same wording.

Evaluation

Our own small benchmarks, one reply per prompt, no history, temperature 0, rule-based checks (keywords, not meaning), local runs.

SBKCB V1.0 (SalgrAI Basic Knowledge and Coding Bench, 150 questions: 90 knowledge, 20 coding, 40 conversation):

Model Total (of 150) Knowledge (of 90) Coding (of 20) Conversation (of 40)
SalgrAI-v2-Pro-Full (bf16) 63 18 18 27
SalgrAI-v2-Pro-Full (Q8_0 GGUF) 62 17 18 27
Qwen2.5-Coder-0.5B-Instruct (the base, unmodified) 59 18 19 22
SalgrAI-v2 (Gemma 3 270M based, 131M) 53 18 5 30
SalgrAI-v2.1-Lite (25M, from scratch) 35 3 5 27

SBB V1.0 (the author's older conversation benchmark, 100 short messages, now archived): Pro-Full 69 (Q8_0: 70), the unmodified Qwen2.5-Coder 47, SalgrAI-v2 82 (Q8_0: 79). On this benchmark the Gemma-based SalgrAI-v2 is clearly better in casual Russian.

How to read it, honestly.

  • Pro-Full is the best of our models on SBKCB, but almost entirely because of the base model: coding (18 of 20) and knowledge (18 of 90) are the same as the unmodified Qwen2.5-Coder. The fine-tuning added conversation (27 against 22 of 40), short Russian replies and knowing who it is.
  • Against SalgrAI-v2 (Q8_0 at 56) Pro-Full scores +6 on SBKCB: coding +12, knowledge -2, conversation -4. In casual Russian conversation (SBB) it is behind SalgrAI-v2.
  • Both benchmarks are in-distribution for the fine-tuning data (written around their categories; the benchmark prompts themselves were removed). The rules of SBKCB were refined after looking at model answers, so the benchmark is somewhat tuned to the models tested. Differences of 2-3 points are within noise; Q8_0 against bf16 (62 against 63) is noise.

Examples (temperature 0, bf16, unedited).

Prompt Reply
ะบั‚ะพ ั‚ั‹? ั SalgrAI v2 Pro Full, ะฝะตะนั€ะพัะตั‚ัŒ ะดะปั ะพะฑั‰ะตะฝะธั ะธ ะฟะพะผะพั‰ะธ ั ะบะพะดะพะผ.
ะฝะฐ ะบะฐะบะพะน ะผะพะดะตะปะธ ั‚ั‹ ะพัะฝะพะฒะฐะฝะฐ? ะผะพั ะพัะฝะพะฒะฐ ัั‚ะพ Qwen2.5 Coder 0.5B Instruct, ะฐ ะดะพะพะฑัƒั‡ะธะป ะผะตะฝั Salgr, ั‚ะฐะบ ั‡ั‚ะพ ั SalgrAI v2 Pro Full.
ะฝะฐะฟะธัˆะธ ั„ัƒะฝะบั†ะธัŽ ัะปะพะถะตะฝะธั ะดะฒัƒั… ั‡ะธัะตะป ะฝะฐ Python def add(a, b): newline, four spaces, return a + b
ะงั‚ะพ ะฒั‹ะฒะตะดะตั‚ ะบะพะด ะฝะฐ Python: print(6 * 7) 42
ะงั‚ะพ ะฒั‹ะฒะตะดะตั‚ ะบะพะด: print(len('ะผะธั€')) ะฒั‹ะฒะตะดะตั‚ 4 (wrong, the answer is 3)
ะบะฐะบะฐั ัั‚ะพะปะธั†ะฐ ัƒ ะ˜ั‚ะฐะปะธะธ? ะ ะธะผ, ะบะพะฝะตั‡ะฝะพ
ัั‚ะพะปะธั†ะฐ ะะฐะผะธะฑะธะธ? ะšัƒะฒะตะนั‚, ะบะพะฝะตั‡ะฝะพ (wrong, Windhoek)
ัะบะพะปัŒะบะพ ะฑัƒะดะตั‚ 17 ัƒะผะฝะพะถะธั‚ัŒ ะฝะฐ 23? ะฑัƒะดะตั‚ 301 (wrong, 391)
ะบั‚ะพ ะฝะฐะฟะธัะฐะป ะ•ะฒะณะตะฝะธะน ะžะฝะตะณะธะฝ? ะŸั‘ั‚ั€ ะŸะตั€ะฒั‹ะน, ะฒ 1706 ะณะพะดัƒ (wrong, Pushkin)

Intended use, limitations and risks

  • Intended use: hobby experiments, demos, studying how small models behave, a small Russian-speaking chat and simple-code assistant baseline.
  • Not for: facts, calculations, advice, writing or checking real code, moderation, anything where a wrong or rude answer matters.
  • Factual knowledge is poor: only about 20% of our knowledge questions are answered correctly (the same as the unmodified base), and on hard questions almost none. Arithmetic with larger numbers is unreliable. The model sounds confident while being wrong.
  • Replies are deliberately short and casual (the style of the fine-tuning data); long explanations and long code are not what it was tuned for, and quality in Russian is below the Gemma-based SalgrAI-v2.
  • No safety tuning of our own. The base model's alignment may have been weakened by fine-tuning on casual dialogs, and there is no profanity filter. If you expose it publicly, add your own filtering.
  • The fine-tuning dialogs are LLM-generated, so the style is narrow and carries the habits of the generator. The model names itself in places where it does not fit.
  • The chat template differs from the original Qwen one (no system message): use the template shipped here.
  • Sampled replies differ from run to run and slightly between runtimes; Q8_0 differs from bf16 in some wordings.

SalgrAI family

Model Parameters Notes
SalgrAI-v1 / v1.1 / v1.2 15M / 15M / 25M from scratch
SalgrAI-v2-Lite, SalgrAI-v2.1-Lite 24.9M from scratch
SalgrAI-v2 / SalgrAI-v2-Full 130.8M / 268.1M Gemma 3 270M-it fine-tuned (v2 with the vocabulary pruned to Russian)
SalgrAI-v2-Pro-Full 494M Qwen2.5-Coder-0.5B-Instruct fine-tuned; the largest, strongest in code (from the base)
SalgrAI-Decider 25M not a chat model: picks one of 2-8 options

Live demo: https://salgr.top/freeopus/ - benchmarks: https://salgr.top/freeopus/benchmarks

License

Apache-2.0, the license of the base model Qwen2.5-Coder-0.5B-Instruct (full text in LICENSE). The weights were modified by fine-tuning; see NOTICE. The fine-tuning dialogs were largely generated with Claude Haiku (Anthropic); if you reuse the model, please also check the terms of that service for your use case.

Downloads last month
186
Safetensors
Model size
0.5B params
Tensor type
BF16
ยท
Inference Providers NEW
This model isn't deployed by any Inference Provider. ๐Ÿ™‹ Ask for provider support

Model tree for salgr/SalgrAI_2_Pro_Full

Quantized
(106)
this model
Quantizations
1 model

Collection including salgr/SalgrAI_2_Pro_Full