Free · Daily brief + weekly playbookDaily 60-sec AI Voice Brief + Weekly Production AI Agent PlaybookGet the brief →
ReleaseInsight · On RadarHabr AI→ original

A 4.7 MB Skill Taught Qwen3.8-27B to Write 1C Queries: 98.7% Fully Correct Answers vs 23%

Neural networks confuse the 1C query language with SQL. They write LIMIT or "ПО УБЫВАНИЮ" (the SQL-style "DESC") instead of "УБЫВ" (the 1C keyword for descending order), and such a query will not run. A Habr author built a 4.7 MB skill for Qwen3.8-27B: a set of per-neuron multipliers baked into the weights without fine-tuning. The share of answers where every token is correct rose from 23.0% to 98.7% on held-out dialogues. This means one large model can be kept in memory alongside a set of small skills for different tasks.

AI-processed from Habr AI; edited by Hamidun News
A 4.7 MB Skill Taught Qwen3.8-27B to Write 1C Queries: 98.7% Fully Correct Answers vs 23%
Source: Habr AI. Collage: Hamidun News.
Listen to article
Article Fact Sheet & Key Figures
ParameterDetails
Primary sourceHabr AI ↗
Editor-in-Chief
Training6,100 steps, an hour and a half on a single RTX PRO 6000
Key metric #2The 4-bit version weighs 14.3 GB and fits on 16–24 GB cards
Testing used training schemascheck object names against your real database

Ask a local LLM to write a 1C query, and the code looks convincing but does not run: the model sees the familiar "ВЫБРАТЬ", "ИЗ", "ГДЕ" (the 1C keywords for SELECT, FROM, WHERE) and writes SQL in Russian letters. The author of the Habr post took Andrey Druzd's dataset and built a skill for Qwen3.8-27B: a tiny 4.7 MB file that tunes the model to the 1C query language, while the weights themselves are not changed during training. On held-out dialogues, the share of answers where the model landed on the right query in full rose from 23–34% to 98–99%. Training took an hour and a half on a single RTX PRO 6000 GPU.

Why 1C confuses models

The 1C query language resembles SQL, and the training data contains hundreds of times more SQL. Large models generally know 1C syntax, but they pick it less often than the familiar SQL. That leads to typical errors: LIMIT, TOP, COALESCE and JOIN ON constructs, which do not exist in the language; wrong parameters for virtual register tables (the second parameter sets a condition, not a value); "ПО УБЫВАНИЮ" (SQL-style "DESC") instead of "УБЫВ" (the 1C keyword for descending order); and invented prefixes and fields that are not in the schema.

The skill's job is not to teach the model something new, but to shift it toward what it already knows.

How the skill works

Each of the 64 layers of Qwen3.8-27B has an FFN block with 17,408 neurons. The skill gives every neuron a single multiplier between 0 and 1: some neurons stay almost unchanged, others are dampened. That comes to about 1.11 million numbers, which together take up 4.7 MB. The multipliers are learned with ordinary gradient descent, all at once, while the model's weights are left untouched. After training, the multipliers are baked into the weights: the columns of the matrices are multiplied by these numbers. The result is the same model, at the same size and speed, only tuned for 1C.

Data: 3,068 dialogues went into training and 195 were held out for testing (the author separately verified that they are not in the training set). Each dialogue contains a metadata schema, a task, and an answer with a query, parameters and a short explanation. Training ran in Colab on a single RTX PRO 6000: 6,100 steps at 0.7–0.9 seconds each. Step 5,000 turned out to be the best, and the skill covers most of its progress in the first 500 steps.

What the measurements showed

The "whole answer" metric means that at every position in the answer, the model ranks the correct token first. The average across task types rose from 23.0% to 98.7%, and across all dialogues from 33.6% to 98.0%. The share of correct tokens rose from 78.0% to 99.2%.

The second test uses 161 pairs of a correct and an erroneous answer. The author adds a caveat here: the base model's 10.6% on the differing fragments does not mean it prefers errors. The correct fragment is longer (85 tokens on average versus 13), so its total probability is always lower. Per token, the base model already picks the correct variant in all 161 pairs. The skill makes the correct tokens nearly unambiguous and the erroneous ones even less likely.

On the author's own "Trade" schema, the base model produced a query with three errors: a superfluous "ВиртуальнаяТаблица." ("VirtualTable.") prefix, a condition instead of a value in a virtual table parameter, and "ПО УБЫВАНИЮ" (SQL-style "DESC"). The version with the skill wrote the query correctly and added parameters with types on its own. One minor slip remained: the model invented the type of the "Склад" ("Warehouse") parameter, because there was no warehouse catalog in the schema.

Running it, and an engineering side result

The model is published on Hugging Face as three files: 8-bit (27.4 GB, for cards and machines with 32 GB of memory or more), 4-bit (14.3 GB, for GPUs with 16–24 GB) and a standalone 4.7 MB skill that can be applied to your own base model. Everything runs through the cortiq engine with an OpenAI API-compatible server. On an RTX PRO 6000, a query to the 4-bit model gets an answer in about 4 seconds.

Scoring the pairs requires 2,569 queries to the 27-billion-parameter model, and the CPU path did not finish a single one in six minutes. The author wrote a GPU path for CUDA and Vulkan: on a small model it is 9 times faster, and scoring the 27B model took 18 minutes. CUDA and Vulkan results matched to within 0.0001 per token, while the CPU path diverged because of int8 activation quantization.

Limitations

The skill was trained on training schemas, so object and field names must be checked against your real metadata. The metrics are computed with a reference prefix, meaning the model is given the correct beginning of the answer. In free generation there may be more errors. You need to use the system prompt from the repository and the flag that disables reasoning, because the dataset contained none. The DTG-MA method belongs to the author, who has filed a patent application for it; the engine is open.

The practical takeaway for teams: you can keep one large model in memory and plug in small skills for 1C, SQL or internal documentation. Each weighs megabytes, not gigabytes, and does not require a separate copy of the model.

Story

Key Questions Answered

Why 1C confuses models?

The 1C query language resembles SQL, and the training data contains hundreds of times more SQL. Large models generally know 1C syntax, but they pick it less often than the familiar SQL. That leads to typical errors: LIMIT, TOP, COALESCE and JOIN ON constructs, which do not exist in the language; wrong parameters for virtual register tables (the second parameter sets a condition, not a value); "ПО УБЫВАНИЮ" (SQL-style "DESC") instead of "УБЫВ" (the 1C keyword for descending order); and invented…

How the skill works?

Each of the 64 layers of Qwen3.8-27B has an FFN block with 17,408 neurons. The skill gives every neuron a single multiplier between 0 and 1: some neurons stay almost unchanged, others are dampened. That comes to about 1.11 million numbers, which together take up 4.7 MB. The multipliers are learned with ordinary gradient descent, all at once, while the model's weights are left untouched. After training, the multipliers are baked into the weights: the columns of the matrices are multiplied by these numbers.

What the measurements showed?

The "whole answer" metric means that at every position in the answer, the model ranks the correct token first. The average across task types rose from 23.0% to 98.7%, and across all dialogues from 33.6% to 98.0%. The share of correct tokens rose from 78.0% to 99.2%. The second test uses 161 pairs of a correct and an erroneous answer. The author adds a caveat here: the base model's 10.6% on the differing fragments does not mean it prefers errors.

ZK
Zhemal Khamidun — Head of AI at Alpina Digital · MIPT (academic supervisor of the Tech Entrepreneurship department). Building AI products since 2019. Hamidun News is a pet project that grew into a production aggregator with 6,000+ readers.
✦ Free · Waitlist · Hermes + DeepSeek

Free 2-Day Vibecoding & AI Agents Intensive

Day 1: the autonomous Hermes + DeepSeek AI agent — vibecoding and development on par with Claude Code / Codex / Gemini. Led by Jemal Hamidun, Head of AI at Alpina Digital and academic supervisor at MIPT. Right after you register with our bot Nika: the recording + 11 materials from the previous intensive.

Join the waitlist →Nomad AI Workspace
Jemal Hamidun

Editor-in-chief · Cite this analysis

Jemal Hamidun

Head of AI at Alpina Digital · Academic Supervisor of the Tech Entrepreneurship Department at MIPT

Head of AI & CPO of AlpinaGPT at Alpina Digital, Academic Lead of Tech Entrepreneurship at MIPT. Founder of Hamidun News and Vibe Academy.

Ready-to-paste citation for journalists, blogs and Telegram channels

Source: Hamidun News — A 4.7 MB Skill Taught Qwen3.8-27B to Write 1C Queries: 98.7% Fully Correct Answers vs 23% https://news.hamidun.com/en/news/18207/a-4-7-mb-skill-taught-qwen3-8-27b-to-write-1c-queries-98-7-f

What do you think?
Loading comments…