/ Модель

Характеристики

Контекст
262 144 токена
Параметры
3,7 млрд
Лицензия
Apache 2.0
Архитектура
qwen3 · dense
Базовая модель
Qwen3-4B-Instruct-2507
Библиотека
transformers
Опубликована
29 ноя 2026

Qim-4B

Генерация текстаТекст → текст
1 862скачиваний за 30 дней0лайковвеса обновлены30 ноя 2026

Описание модели

Составлено на русском по карточке модели и метаданным Hugging Face

Двуязычная дообученная модель Antinimus для генерации кода, особенно на C++20 с Dear ImGui и Python, а также для диалогов и рассуждений.

Qim-4B — двуязычная языковая модель Antinimus для программирования, рассуждений и общих диалогов. Это дообученная плотная модель семейства Qwen3 с архитектурой Qwen3ForCausalLM и примерно 3,7 млрд параметров, основанная на Qwen/Qwen3-4B-Instruct-2507. Она принимает текст и выдаёт текст; поддерживает английский и русский языки, а нативное окно контекста составляет 262 144 токена. Доступны объединённые веса BF16 в Safetensors и квантизованные сборки GGUF Q4_K_M, Q5_K_M и Q8_0.

Модель ориентирована на генерацию и исправление кода, особенно на C++20 с Dear ImGui 1.93.1 и Python, а также на диалоговые задачи и рассуждения по запросу. В описанном разработчиком бенчмарке она улучшила результаты базовой модели на задачах компиляции и тестирования C++/Dear ImGui, однако абсолютные показатели решения задач остаются невысокими. Модель может обрывать длинные ответы с кодом и хуже справляется со сложными многофайловыми проектами и отдельными задачами рендеринга. Лицензия весов — Apache-2.0; в README также отмечено, что лицензия одного из использованных наборов данных не указана.

Сценарии применения

  • написание и исправление кода на C++20
  • создание интерфейсов на Dear ImGui 1.93.1
  • генерация и разбор кода на Python
  • ответы на вопросы по программированию на русском и английском
  • диалоговые задачи и рассуждения по запросу

Ограничения

Модель может испытывать трудности со сложными многофайловыми проектами, пользовательской отрисовкой и динамическими текстурами; в тестах разработчика её абсолютные результаты решения задач были невысокими. При жадной генерации длинные запросы могут упираться в лимит токенов до завершения блока кода.

Публичные бенчмарки

Результаты из открытых лидербордов в сравнении с лидерами каталога

Бенчмарки пользователейпока нет

Никто ещё не опубликовал тест этой модели. Соберите бенчмарк из своих задач — результат появится здесь рядом с другими моделями теста

  1. Добавьте модель в бенчмарк

    Вместе с другими моделями категории «Текст» — сравнение идёт внутри одной категории.

  2. Опишите свои задачи

    Напишите запросы, при необходимости приложите файлы и эталонные ответы.

  3. Запустите и опубликуйте

    Модели ответят на каждую задачу, судья оценит ответы по шкале 0–100.

Карточка модели

README от автора на Hugging Face, как он его опубликовал

Открыть на Hugging Face

Qim-4B

Qim-4B is a 4B bilingual (English & Russian) coding, reasoning, and general assistant model fine-tuned from Qwen/Qwen3-4B-Instruct-2507 with a focus on C++20, Dear ImGui (1.93.1, IMGUI_DISABLE_OBSOLETE_FUNCTIONS), Python, and on-demand <think>...</think> reasoning.

Created by Antinimus.

  • Model Family / Base: Qwen/Qwen3-4B-Instruct-2507 (4.06B params, 36 layers, GQA 32Q / 8KV)
  • Weights Format: Standalone merged BF16 weights (model.safetensors, with the LoRA adapter and calibrated <think> / </think> embedding & LM-head rows already merged — no separate LoRA loading required). All GGUF files are quantized directly from these merged BF16 weights.
  • Context Length: 262,144 tokens (256K) native context window (max_position_embeddings: 262144, rope_theta: 5,000,000 in config.json; SFT training sequence cutoff: 1,536 tokens; benchmark evaluation generation limit: 2,048 tokens).

Highlights

  • +50% More Compiling C++20 / Dear ImGui 1.93.1 Solutions: On Europa ImPlus BenchMark (EIPB), improved compilation rate from 28 / 100 (Qwen3-4B-Instruct-2507 Base) to 42 / 100 (+14 tasks), and +75% Solved Tasks (7 / 100 vs 4 / 100), lifting Strict EIPB Score from 2.59% to 4.66% and Partial EIPB Score from 5.79% to 7.69%.
  • On-Demand <think>...</think> Reasoning Restored: Qwen3-4B-Instruct-2507 is originally a non-thinking checkpoint where <think> and </think> embeddings are collapsed near <tool_call> (cos = 0.9901). Targeted embedding + LoRA calibration separated <think>/</think> cleanly (cos = 0.4454), enabling <think>...</think> reasoning when requested while staying concise and direct on normal coding/chat requests.
  • Compiler & Headless-Verified Dear ImGui 1.93.1 Data: Curated with zero mid-response truncation (missing_eos = 0) and verified using g++ 16.2.0 -std=c++20 -DIMGUI_DISABLE_OBSOLETE_FUNCTIONS plus 3-frame headless ImGui::NewFrame()/Render() execution (57/57 Dear ImGui 1.93.1 modules passed).
  • Verified GGUF Quantizations: Standalone merged Q4_K_M, Q5_K_M, and Q8_0 GGUF builds tested end-to-end with llama.cpp b12843 (llama-cli -ngl 99 -st).

Benchmark & Evaluation — Europa ImPlus BenchMark (EIPB)

Evaluated on Europa ImPlus BenchMark (EIPB): 100 executable C++20 / Dear ImGui 1.93.1 (docking, IMGUI_DISABLE_OBSOLETE_FUNCTIONS) tasks across 8 categories (31 easy, 45 medium, 24 hard).

Qim-4B EIPB Benchmark

How EIPB Scoring Works

  • Difficulty Weights: Each task is weighted by difficulty (1 for easy, 2 for medium, 3 for hard), summing to 193 max points.
  • Strict Score (EIPB Score): Percentage of the 193 points awarded only for tasks where 100% of hidden headless UI unit tests pass.
  • Partial Score (EIPB Partial): Percentage of the 193 points giving fractional credit (passed_tests / total_tests) * task_points, reflecting compiling solutions and partial test passes.
  • Local Testbed: Windows 11, MinGW-W64 WinLibs g++ 16.2.0 (UCRT, -std=c++20). Local Qwen models were evaluated with greedy decoding (temperature=0.0, max_new_tokens=2048).

Overall Comparison (Local WinLibs GCC 16.2.0 Harness)

ModelProtocol / NotesCompiledSolved (pass@1)Strict (EIPB Score)Partial (EIPB Partial)
Antinimus/Qim-1.5BLocal BF16 (temp=0.0, WinLibs GCC 16.2.0)25 / 1001 / 100 (1.0%)0.52%1.99%
Qwen/Qwen3-4B-Instruct-2507 (Base)Local BF16 (temp=0.0, WinLibs GCC 16.2.0)28 / 1004 / 100 (4.0%)2.59%5.79%
Qim-4B (Ours)Local BF16 (temp=0.0, WinLibs GCC 16.2.0)42 / 1007 / 100 (7.0%)4.66%7.69%
Claude Opus 5.5 (Reference)Web Chat (effort: High, 2026-11-29, WinLibs GCC 16.2.0)94 / 10089 / 100 (89.0%)88.08%90.07%

Reproducibility note: All local models and the Claude Opus 5.5 reference were graded on the exact same Windows 11 / WinLibs GCC 16.2.0 harness shown above (on its separate Linux GCC + ASan/TSan run, those same Claude Opus 5.5 answers scored 100/100 compiled, 97/100 solved, 97.41% strict, 98.88% partial).

Per-Category Breakdown (Partial% (Strict%, Solved))

Category (Tasks / Max Pts)Qim-1.5BQwen3-4B-Instruct-2507 (Base)Qim-4B (Ours)Claude Opus 5.5 (High, WinLibs)
Core Widgets (15 / 19)11.4% (5.3%, 1/15)27.2% (21.1%, 3/15)49.1% (31.6%, 5/15)100.0% (100.0%, 15/15)
Input & Popups (15 / 31)2.2% (0.0%, 0/15)12.4% (3.2%, 1/15)7.5% (3.2%, 1/15)100.0% (100.0%, 15/15)
Layout & Tables (15 / 30)1.7% (0.0%, 0/15)1.7% (0.0%, 0/15)6.7% (6.7%, 1/15)100.0% (100.0%, 15/15)
Custom Rendering (15 / 30)0.0% (0.0%, 0/15)0.0% (0.0%, 0/15)0.0% (0.0%, 0/15)100.0% (100.0%, 15/15)
Fonts, Style & IO (12 / 24)0.0% (0.0%, 0/12)0.0% (0.0%, 0/12)0.0% (0.0%, 0/12)70.8% (66.7%, 9/12)
Architecture C++ (13 / 29)0.0% (0.0%, 0/13)2.3% (0.0%, 0/13)2.3% (0.0%, 0/13)77.0% (69.0%, 9/13)
Debugging (10 / 16)3.1% (0.0%, 0/10)6.2% (0.0%, 0/10)3.1% (0.0%, 0/10)65.6% (62.5%, 6/10)
Projects (5 / 14)0.0% (0.0%, 0/5)0.0% (0.0%, 0/5)0.0% (0.0%, 0/5)100.0% (100.0%, 5/5)

GGUF Quantizations

All GGUF builds were exported from the standalone merged BF16 weights (llama.cpp b12843) — no separate LoRA adapter is required — and verified on AMD Vulkan (RX 9060 XT) using llama-cli -ngl 99 -st for Qwen chat formatting, <think> tag generation, and clean EOS stopping:

FileQuantSizeVerified Speed (RX 9060 XT Vulkan)Notes
gguf/Qim-4B-Q4_K_M.ggufQ4_K_M2.33 GiB (2,497,278,912 B)~104.8 t/sCompact 4-bit build for fast local inference
gguf/Qim-4B-Q5_K_M.ggufQ5_K_M2.69 GiB (2,889,511,872 B)~93.1–93.7 t/sRecommended balance of speed and coding/reasoning quality
gguf/Qim-4B-Q8_0.ggufQ8_03.99 GiB (4,280,403,392 B)~67.9 t/sNear-lossless 8-bit quantization

Quickstart

transformers (Standalone Merged BF16)

import torch
from transformers import AutoModelForCausalLM, AutoTokenizer

model_id = "Antinimus/Qim-4B"
tokenizer = AutoTokenizer.from_pretrained(model_id)
model = AutoModelForCausalLM.from_pretrained(
    model_id,
    dtype="auto",
    device_map="auto",
)

messages = [
    {"role": "system", "content": "You are Qim. Think concisely inside <think>...</think> when helpful."},
    {"role": "user", "content": "Think inside <think>...</think> before answering: If 3x + 7 = 22, what is x^2 + 1?"},
]
text = tokenizer.apply_chat_template(messages, tokenize=False, add_generation_prompt=True)
inputs = tokenizer([text], return_tensors="pt").to(model.device)

with torch.no_grad():
    out = model.generate(
        **inputs,
        max_new_tokens=512,
        temperature=0.7,
        top_p=0.8,
        top_k=20,
        do_sample=True,
    )

response = tokenizer.decode(out[0][inputs["input_ids"].shape[1]:], skip_special_tokens=False)
print(response)

llama.cpp (GGUF — llama-cli & llama-server)

Install prebuilt binaries or build from source via the official ggml-org/llama.cpp repository (Releases).

CLI single-turn inference:

llama-cli -m Qim-4B-Q5_K_M.gguf -ngl 99 --temp 0.7 --top-p 0.8 --top-k 20 -st -p "Напиши короткий виджет Dear ImGui 1.93.1 с чекбоксом VSync и слайдером Scale."

OpenAI-compatible API server (port 9931 for Pi, Hermes, OpenClaw, or local IDE clients at http://localhost:9931/v1):

llama-server -hf Antinimus/Qim-4B:Q5_K_M --port 9931 -ngl 99 --temp 0.7 --top-p 0.8 --top-k 20

vLLM (BF16 OpenAI-Compatible Server)

vllm serve Antinimus/Qim-4B --port 9931

Docker Model Runner (GGUF)

docker model run hf.co/Antinimus/Qim-4B:Q5_K_M

Training Details

  • Base Model: Qwen/Qwen3-4B-Instruct-2507 (4.06B parameters, 36 layers, 262,144-token context)
  • Method & Weight Merging:
    • LoRA SFT (r=16, lora_alpha=32, lora_dropout=0.05, all linear projections: q_proj, k_proj, v_proj, o_proj, gate_proj, up_proj, down_proj; 33,030,144 trainable params / 0.8145%)
    • At the end of Stage 2, the LoRA adapter and the calibrated <think> / </think> embedding & LM-head rows were merged directly into the bfloat16 checkpoint (model.safetensors), and all GGUF quantizations were exported from that merged BF16 model.
  • Stage 1 — Domain, Coding & Bilingual Mix (367 optimizer steps, val_loss = 0.5508):
    • imgui_v4_clean: 280 rows at Stage 1 (47 headless-verified Dear ImGui 1.93.1 modules × 2 EN/RU = 94 + 179 C++20 algorithms + 7 compact UI examples), repeated ×2 = 560 raw rows
    • C++ instructions (1,600) + Python code instructions (1,200) + Bilingual chat (900 RU + 600 EN = 1,500) + Bespoke-Stratos-17k reasoning traces (1,200)
    • Exact Stage 1 Sample Count: 560 + 1,600 + 1,200 + 1,500 + 1,200 = 6,060 raw rows -> 97% / 3% train/val split (5,878 / 182) -> strict len(input_ids) <= 1,536 filter removed 8 train + 1 val overlength rows -> 5,870 train / 181 val (missing_eos = 0, zero mid-response truncation)
    • bs=1, grad_accum=16, cosine lr=2.5e-5
  • Stage 2 — Targeted <think> Token & C++20 Calibration (100 optimizer steps, val_loss = 0.5852):
    • imgui_v4_clean expanded by +10 headless Dear ImGui 1.93.1 modules (57 × 2 = 114 EN/RU + 179 C++20 algorithms + 7 compact UI = 300 rows, weighted ×1) + C++ (350) + Python (250) + EN/RU chat (300) + concise <think> set (450 = 40 curated EN/RU pairs + 410 <= 1,150-token traces from Bespoke-Stratos-17k)
    • Exact Stage 2 Sample Count: 300 + 350 + 250 + 300 + 450 = 1,650 raw rows -> 97% / 3% split -> 1,600 train / 50 val (0 filtered out, missing_eos = 0)
    • Gentle LoRA (lr=8e-6) + dedicated FP32 2-row embedding/LM-head optimization (--train-think-tokens, lr=2e-3 on <think> / </think>)
  • Hardware & Runtime: AMD Radeon RX 9060 XT (16 GiB VRAM), Windows 11, PyTorch 2.9.1+rocm7.13 with Chunked Cross-Entropy Loss and AOTriton efficient SDPA attention

Training Data & Upstream Licenses

ComponentSource Repository / DatasetRoleUpstream License
Base ModelQwen/Qwen3-4B-Instruct-2507Pretrained & instruct backbone (4B, 256K ctx)Apache-2.0
Dear ImGui 1.93.1 UI & Demo Snippetsocornut/imgui + custom headless-verified cookbook modulesBilingual EN/RU Dear ImGui 1.93.1 coding tasksMIT
C++20 Algorithms (179 rows)TheAlgorithms/C-Plus-PlusModern C++20 data structures & algorithmsMIT
C++ Instruction Pairsm-a-p/CodeFeedback-Filtered-Instruction, ise-uiuc/Magicoder-OSS-Instruct-75KGeneral C++ coding & explanationsApache-2.0 / MIT
Python Code Corpusiamtarun/python_code_instructions_18k_alpaca, CodeFeedback-Filtered-Instruction, Magicoder-OSS-Instruct-75KPython retention mixUnspecified in HF metadata (python_code_instructions_18k_alpaca); Apache-2.0 / MIT
Russian Chat (900 rows)Vikhrmodels/GrandMaster-PRO-MAXRussian conversational & reasoning fluencyApache-2.0
English Chat (600 rows)HuggingFaceH4/ultrachat_200kEnglish instruction followingMIT
<think> Reasoning Tracesbespokelabs/Bespoke-Stratos-17k + custom concise EN/RU pairsOn-demand <think>...</think> calibrationApache-2.0

Limitations

  • Complex multi-file architecture, custom draw-list rendering, dynamic font-atlas textures, and multi-component project tasks remain challenging for 4B-parameter models (see EIPB category table above).
  • Under pure greedy decoding (temperature=0.0, no repetition penalty), 12/100 long UI prompts still hit the 2,048-token cap before closing their code block (88/100 extracted vs 96/100 for Base); use the recommended Qwen3 sampling (temperature=0.7, top_p=0.8, top_k=20) in interactive use.
  • Target Dear ImGui API knowledge is aligned with 1.93.1 (IMGUI_DISABLE_OBSOLETE_FUNCTIONS).
  • While merged model weights are released under Apache-2.0 matching Qwen/Qwen3-4B-Instruct-2507, one subset component (iamtarun/python_code_instructions_18k_alpaca) does not specify a license field in its Hugging Face card metadata.

Acknowledgments

Built on top of Qwen/Qwen3-4B-Instruct-2507, bespokelabs/Bespoke-Stratos-17k, and the Europa ImPlus BenchMark (EIPB) / Dear ImGui (1.93.1) ecosystem.

Support

If you find Qim-4B useful and want to support future releases and benchmarks:

NetworkAddress
ETH0x9e708ebD5A80867002Bb2e8d5901d50B192E5cc3
BTCbc1q5762nneqpkjza5v37lwgjmfm3y3m4gu6td6kpc
SOLEz2VDw5cAz3HGNvhVifRisJ39doebUWELBwm6Hc7rThJ
TRON (TRC20)TEPG7QPjZF2vjAdNn6DN9wUcpSBn2UiSS2
POLYGON0x9e708ebD5A80867002Bb2e8d5901d50B192E5cc3

Как запустить

На своей GPU в ailist. Цена — по текущим предложениям провайдеров

GPU в ailist

Универсальный рантайм · transformers

Можно запустить

Подбираем GPU…

Класс архитектуры
Qwen3ForCausalLM
Ревизия весов
0c99a2f

0 моделей