SalgrAI v3 Ultra Full
SalgrAI v3 Ultra Full is Qwen/Qwen2.5-Coder-1.5B-Instruct fine-tuned with LoRA on rewritten real SalgrAI user logs, casual Russian dialogs, verified Python/HTML coding tasks and general Russian Q&A. Compared with the unmodified base model, it adopts SalgrAI's concise, friendly Russian persona (with a default SalgrAI system prompt in the chat template), improves Python coding on edge cases and code-output prediction, and gains +17 points on SBKCB V1.0 (bf16: 97 vs 80 of 150). Trained on a single RTX 3060 (12 GB). Made for experiments, demos and learning, not for production or high-stakes use.
Please read the Limitations section. Factual knowledge outside training still hallucinates (especially rare capitals and history/literature trivia), and there is no dedicated safety alignment beyond the base model and refusal examples in the dataset.
Model summary
| Base model | Qwen/Qwen2.5-Coder-1.5B-Instruct (Apache-2.0) |
| Architecture | Unchanged Qwen2 decoder-only: 28 layers, hidden 1,536, 12 attention heads (2 KV heads, GQA), FFN 8,960, context 32,768 |
| Parameters | 1,543,714,304 = 1,310,340,608 in the layers + 233,373,696 in the embedding table (151,936 tokens x 1,536, tied embeddings) |
| Vocabulary | 151,936 tokens (unchanged Qwen2.5 tokenizer) |
| Language | Russian (primary), English (coding and chat preserved; responds in French when prompted) |
| Format | ChatML with a built-in SalgrAI default system prompt (chat_template.jinja and tokenizer_config.json) |
| Developed by | Salgr |
| License | Apache-2.0, as the base model (see LICENSE and NOTICE) |
Files
| File | Size | What it is |
|---|---|---|
model.safetensors | 3.09 GB | weights, bfloat16 (loads with transformers) |
SalgrAI-v3-Ultra-Full-F16.gguf | 3.09 GB | GGUF, float16, for llama.cpp |
SalgrAI-v3-Ultra-Full-Q8_0.gguf | 1.65 GB | GGUF, 8-bit: recommended for local CPU/GPU |
SalgrAI-v3-Ultra-Full-Q4_K_M.gguf | 986 MB | GGUF, 4-bit: smallest, slight quality drop on SBKCB |
config.json, generation_config.json | model config and recommended sampling (temperature: 0.5, top_k: 40, top_p: 0.9, repetition_penalty: 1.1) | |
tokenizer.json, vocab.json, merges.txt, tokenizer_config.json, chat_template.jinja | Qwen2 tokenizer and SalgrAI ChatML template | |
chat_example.py | minimal terminal chat script keeping dialog history | |
.gitattributes | Git LFS rules for safetensors and GGUF weights | |
LICENSE, NOTICE | Apache-2.0 license text and derivative notice |
Quick start
Transformers
import torch
from transformers import AutoModelForCausalLM, AutoTokenizer
repo = "salgr/SalgrAI-v3-Ultra-Full" # or local folder path
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))
To keep a multi-turn conversation, append each assistant reply and next user turn to messages (chat_example.py does this and retains the last 10 messages).
llama.cpp (GGUF)
llama-server -m SalgrAI-v3-Ultra-Full-Q8_0.gguf -c 2048 --port 8080
curl http://127.0.0.1:8080/v1/chat/completions -H "Content-Type: application/json" \
-d '{"messages": [{"role": "user", "content": "привет"}], "max_tokens": 200, "temperature": 0.5, "top_k": 40, "top_p": 0.9, "repeat_penalty": 1.1}'
The SalgrAI ChatML template is embedded in the GGUF files, and generation stops automatically at <|im_end|>.
Training
- Base & method.
Qwen/Qwen2.5-Coder-1.5B-Instructfine-tuned inbfloat16using LoRA (r=24,lora_alpha=48,lora_dropout=0.05on all attention and MLP linear projectionsq_proj, k_proj, v_proj, o_proj, gate_proj, up_proj, down_proj; 27,697,152 trainable parameters = 1.76%; embedding table frozen). AdamW, peak learning rate8.5e-5, cosine decay,weight_decay=0.03, effective batch size 16, loss computed on assistant tokens only. Selected checkpoint: step 90 (~1.45 epochs,eval_loss=0.6208), merged back intobfloat16weights. - Data: 990 training dialogs (plus 52 held out for validation):
- Rewritten real user logs (153 rows, 3x weight): 51 cleaned and rewritten dialogs from production SalgrAI user logs (
salgrai-dialogs-2026-11-25_2026-12-01.jsonl) fixing broken HTML/games, Python errors, math/logic hallucinations, spam/insult echoing and unsafe provocations (extreme abusive CSAM queries were filtered out). - SalgrAI chat & boundaries (137 rows): casual Russian greetings/slang, self-identity, multi-turn memory dialogs, trolling/prompt-injection boundaries, reading comprehension and everyday smalltalk.
- Coding (295 rows): single-file HTML5/Canvas/JS interactive apps (3D scenes, calculators, games), unit-tested Python algorithms with defensive edge-case guards, bug-fixing examples, SQL/JS/Bash basics (
coding_rich: 137) and execution-verified Python output tracing (coding_trace: 158). - Knowledge & math (405 rows): Russian encyclopedia facts across geography, history, science, literature and tech (
knowledge: 312) plus verified arithmetic, sequences and word problems (math: 93) formatted with the direct answer first.
- Rewritten real user logs (153 rows, 3x weight): 51 cleaned and rewritten dialogs from production SalgrAI user logs (
- Benchmark leakage control. All non-log training items were programmatically filtered against the 150
SBKCB V1.0items (0 exact prompt matches intrain_dataset.jsonl; overlapping knowledge facts/entities and SBKCB code snippets removed) and against our 25-task Python coding test suite.
Evaluation
All runs use temperature 0, repetition penalty 1.1, single turn without history. For bf16 models, evaluation ran via sbkcb/run_hf.py (max_new_tokens=200); GGUF files were evaluated via llama-server /v1/chat/completions (max_tokens=200).
SBKCB V1.0 (150 questions: 90 knowledge, 20 Python, 40 conversation):
| Model | Total (of 150) | % | Knowledge /90 | Code /20 | Conversation /40 | Easy /46 | Medium /85 | Hard /19 |
|---|---|---|---|---|---|---|---|---|
| SalgrAI v3 Ultra Full (bf16) | 97 | 64.7% | 44 | 20 | 33 | 36 | 55 | 6 |
| SalgrAI v3 Ultra Full (Q8_0 GGUF) | 94 | 62.7% | 42 | 20 | 32 | 35 | 54 | 5 |
| SalgrAI v3 Ultra Full (F16 GGUF) | 92 | 61.3% | 41 | 20 | 31 | 35 | 52 | 5 |
| SalgrAI v3 Ultra Full (Q4_K_M GGUF) | 88 | 58.7% | 38 | 18 | 32 | 36 | 47 | 5 |
| Qwen2.5-Coder-1.5B-Instruct (base, bf16) | 80 | 53.3% | 40 | 14 | 26 | 30 | 46 | 4 |
| SalgrAI-v2-Pro-Full (Q8_0 GGUF, 0.5B) | 62 | 41.3% | 17 | 18 | 27 | 26 | 35 | 1 |
| Qwen2.5-Coder-0.5B-Instruct (base, bf16) | 59 | 39.3% | 18 | 19 | 22 | 23 | 35 | 1 |
| SalgrAI-v2.1 (bf16, 131M) | 58 | 38.7% | 16 | 14 | 28 | 29 | 26 | 3 |
Independent Python coding suite (25 unit-tested tasks executed in isolated subprocesses, 15 RU + 10 EN, temperature 0):
| Model | Passed | RU /15 | EN /10 |
|---|---|---|---|
| SalgrAI v3 Ultra Full (bf16) | 24 / 25 (96.0%) | 15 / 15 | 9 / 10 |
| Qwen2.5-Coder-1.5B-Instruct (base, bf16) | 22 / 25 (88.0%) | 14 / 15 | 8 / 10 |
How to read it honestly.
- Relative to the base
Qwen2.5-Coder-1.5B-Instruct(80/150),SalgrAI v3 Ultra Full(bf16) scores +17 points overall (+6 in coding, +7 in conversation, +4 in knowledge) while also improving execution-verified Python coding from 22/25 to 24/25. - On SBKCB coding, the base model originally failed 6 items mostly by echoing numbers from the prompt before giving the answer (
print(2 + 3)->2) and miscounting Cyrillic characters (len('привет')->5); fine-tuning fixed direct-output formatting and character counting (20/20). - GGUF scores vary slightly by quantization and runtime (
94forQ8_0,92forF16,88forQ4_K_M, vs97forbf16intransformers).Q8_0is recommended;Q4_K_Mloses a couple of points in knowledge and code.
Unedited examples (temperature 0, bf16, from SBKCB):
| Prompt | Reply |
|---|---|
| эй, привет-привет! как оно? | привет) всё отлично, а у тебя как? |
| расскажи немного о себе | я SalgrAI — небольшая нейросеть на 1.5 миллиарда параметров, способная обрабатывать логику, программировать на Python и HTML/JS) |
| Что выведет код на Python: print(len('привет')) | 6 |
| сколько будет 17 умножить на 23? | 391 (17 × 23 = 391). |
| какая столица у Намибии? | Ванкувер. (wrong, Windhoek) |
| кто написал комедию «Горе от ума»? | Антон Павлович Чехов. (wrong, Griboyedov) |
Intended use, limitations and risks
- Intended use: hobby experiments, local demos, testing small Russian coding/chat models, interactive single-file HTML/Python prototyping.
- Not for: fact-checking, critical software engineering, medical/legal/financial advice, automated moderation or anything where hallucinations cause harm.
- Factual reliability: at 1.5B parameters (derived from a Coder base), world knowledge outside training data remains unreliable (
44/90on SBKCB knowledge,6/19on hard questions). - Identity quirks: in chat replies the model normally introduces itself simply as
SalgrAI(matching the trained dialogs and default system prompt); occasional self-descriptions may hallucinate implementation details (e.g., mentioning FastAPI). - Safety: no comprehensive RLHF safety alignment was performed beyond cleaning/rewriting toxic user logs and adding basic refusal examples; add external moderation if deploying publicly.
SalgrAI family
| Model | Parameters | Notes |
|---|---|---|
| SalgrAI-v2-Lite / v2.1-Lite | 24.9M | from scratch |
| SalgrAI-v2 / SalgrAI-v2-Full | 130.8M / 268.1M | Gemma 3 270M-it fine-tuned |
| SalgrAI-v2.1 | 131.1M | Gemma 3 270M-it fine-tuned, weight soup |
| SalgrAI-v2-Pro-Full | 494M | Qwen2.5-Coder-0.5B-Instruct fine-tuned |
| SalgrAI v3 Ultra Full | 1.54B | this model — Qwen2.5-Coder-1.5B-Instruct LoRA fine-tuned |
License
Apache-2.0, matching the base model Qwen/Qwen2.5-Coder-1.5B-Instruct (see LICENSE and NOTICE).