/ Модель

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

Контекст
128 токенов
Параметры
20,4 млн
Лицензия
CC BY 4.0
Архитектура
air_quality_slm · dense
Библиотека
gguf
Опубликована
21 ноя 2026

Air-Quality_SLM.v3

Генерация текстаТекст → текст3 профессии
141скачиваний за 30 дней0лайковвеса обновлены21 ноя 2026

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

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

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

Air Quality SLM v3 — небольшая специализированная языковая модель для текстовых запросов по телеметрии качества городского воздуха, созданная автором репозитория на архитектуре в стиле Qwen3. В ней около 20,4 млн параметров; доступны веса PyTorch и основной артефакт GGUF F16 для запуска, в частности, через Ollama. Модель обучалась с нуля, затем продолжала обучаться на данных UCI Air Quality; версия v3 использует те же веса, что и v2, и меняет только шаблон подачи системной инструкции. Отдельного обучения и оценки v3 не проводилось.

Модель генерирует текстовые ответы на инструкции в узкой предметной области, связанной с данными одной городской станции мониторинга в Италии за 2004–2005 годы. Она обучалась на сырых инструкциях и ожидает запрос, заканчивающийся на Response:; шаблон ChatML применять не следует. Контекст ограничен 128 токенами. Лицензия — CC BY 4.0.

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

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

  • генерация ответов по шаблонам телеметрии качества воздуха
  • объяснение текстовых инструкций о показаниях датчиков воздуха
  • локальные эксперименты с языковой моделью для экологического мониторинга

Ограничения

Численные ответы ненадёжны: модель выдаёт почти постоянные значения и может выдумывать даты. Контекст составляет 128 токенов, данные относятся к одной итальянской станции за 2004–2005 годы, а версия v3 отдельно не оценивалась.

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

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

Публичных оценок пока нет

В подключённых источниках результатов этой модели не нашлось. Отсутствие оценки не значит, что модель хуже: её могли просто не проверять.

Источники: Hugging Face Leaderboards, Hugging Face Eval Results, Open LLM v2, MTEB, timm, Open ASR, EvalPlus, LLM Stats

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

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

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

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

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

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

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

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

Для каких профессий подходит3

Разделы каталога профессий, в задачах которых используется эта модель

Все профессии

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

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

Открыть на Hugging Face

Air Quality SLM — v3

A ~20.4M-parameter domain-specific small language model for urban air quality telemetry, built from scratch on a Qwen3-style transformer block and served through GGUF/Ollama.

Read this first. v3 is an interface variant, not a separately trained model. It reuses the weights of the continued-training checkpoint (v2) and changes only how the prompt reaches the model: the Ollama template becomes {{ .System }}\n{{ .Prompt }}, so a system instruction can be injected ahead of the user text. No v3-specific training run and no v3-specific evaluation exist. Every number below is a v1 or v2 measurement. v3 is therefore not claimed to be better than v2 — it was never measured against it.


1. What is in this repository

FileSizeRole
air_quality_slm_v3.gguf165,774,528 BPrimary runtime artefact (F16 GGUF). Byte-identical to the v2 GGUF it was built from.
Modelfile2,383 BOllama definition for v3: 128-token context, greedy decoding, {{ .System }} template.
pytorch_model.bin81,608,145 BPyTorch state dict of the same checkpoint (float32).
config.json438 BArchitecture and hyper-parameters, max_position_embeddings = 128.
tokenizer.json11,421,892 BQwen2.5/Qwen3 BPE tokenizer, vocab_size = 151,665.
tokenizer_config.json727 BTokenizer settings (`eos = <
src/train_slm.py24,981 BOriginal training script. Included only because it defines the custom Qwen3Model class needed to load pytorch_model.bin.
.gitattributes—LFS rules for the weight files.
FILES_AND_CHECKSUMS.md—Full inventory, SHA-256 of every file, and notes on deliberately excluded files.

chat_template.jinja exists in the training directory but is deliberately not shipped here: it is the stock Qwen2.5 ChatML template, and this model was trained on raw instruction text, not ChatML. Applying it would push the model off its training distribution. See §6.


2. Architecture

ComponentValue
Base familyQwen3-style decoder block, implemented from scratch
Parameters20,397,568 unique (the state dict stores the tied embedding twice, hence 39,810,688 tensor elements)
d_model128
Layers4
Attention heads4 query / 2 KV (grouped-query attention)
d_ff512 (SwiGLU)
NormalisationRMSNorm, ε = 1e-6, with QK norm
Positional encodingRoPE, θ = 10,000
Context window128 tokens
Weight tyingInput embedding tied to output head (out_head.weight is a copy of tok_emb.weight)
Vocabulary151,665 (Qwen2.5/Qwen3 BPE)
Precisionfloat32 (PyTorch), F16 (GGUF)

3. Running it

3.1 Ollama (recommended, no Python code required)

# from a directory containing the .gguf and the Modelfile
ollama create air-quality-slm-v3 -f Modelfile
ollama run air-quality-slm-v3

The Modelfile sets num_ctx 128, temperature 0, top_k 1 and num_predict 48. Greedy decoding is deliberate: it reproduces the exact text the checkpoint emits.

3.2 llama.cpp

llama-cli -m air_quality_slm_v3.gguf -c 128 -n 48 --temp 0

3.3 PyTorch

pytorch_model.bin is a custom architecture, not a transformers model. config.json declares model_type: air_quality_slm, so AutoModelForCausalLM.from_pretrained(...) will not work. Load it with the class shipped in src/train_slm.py:

import json, torch
from transformers import AutoTokenizer
from src.train_slm import Qwen3Model          # requires torch, numpy, tqdm

model_dir = "."
cfg = json.load(open(f"{model_dir}/config.json"))
tok = AutoTokenizer.from_pretrained(model_dir)

model = Qwen3Model(
    vocab_size=cfg["vocab_size"],
    d_model=cfg["hidden_size"],
    n_heads=cfg["num_attention_heads"],
    n_kv_groups=cfg["num_key_value_heads"],
    n_layers=cfg["num_hidden_layers"],
    d_ff=cfg["intermediate_size"],
    max_seq_len=cfg["max_position_embeddings"],
    tie_weights=cfg.get("tie_word_embeddings", True),
)
model.load_state_dict(torch.load(f"{model_dir}/pytorch_model.bin", map_location="cpu"))
model.eval()

prompt = ("Task: Predict the absolute humidity given the following parameters: "
          "Date: 11/03/2004, Time: 02.00.00, CO(GT): 0.9, NOx(GT): 45.0, NO2(GT): 60.0. "
          "Response:")
ids = torch.tensor(tok.encode(prompt, add_special_tokens=False)).unsqueeze(0)
out = model.generate(ids, max_new_tokens=48, temperature=1e-5, top_k=1, repetition_penalty=1.0)
print(tok.decode(out[0].tolist())[len(prompt):].strip())

4. Training

v1v2 (continued training)
Steps1501,200
Block size64128
OptimiserAdamW (β₁ 0.9, β₂ 0.95, wd 0.1, ε 1e-9)same, continued from v1
Schedulelinear warm-up → cosine decaysame, continued
Gradient clipping0.50.5
Tokens seen—614,400 (0.202 epoch)
Wall clock279.01 s1,864 s
HardwareRyzen 5 5600H, 12 logical CPUs, no CUDAsame
Final training loss—recorded in the project's evaluation artefacts

Data: UCI Air Quality (AirQualityUCI.csv, 9,357 rows, 2004-03-10 → 2005-04-04). Sentinel -200 values were mapped to calibrated missingness text rather than imputed, so the model can say a value is unavailable instead of inventing one. Training examples were rendered as plain instruction/response text — no ChatML markers, hence the template warning in §6.


5. Evaluation (v1 and v2 only)

Measured on the held-out split; sources are the project's metrics_v*.json and per-row evaluation files.

Metricv1v2
Validation loss1.42520.4877
Test loss1.44740.5555
Test perplexity4.2521.743
Absolute-humidity MAE (val)—0.4335
Absolute-humidity MAE (test)—0.5345

Control experiment: the closed-form humidity calculation over the same rows reaches MAE 0.02296 (val) / 0.01880 (test) — 18.9× and 28.4× lower than the model. Prediction spread is very small (standard deviation 0.000–0.003), i.e. the model's numeric output is close to constant.

Structural checks on v2 generations:

Checkv2
Emits EOS as trained1.000
Correct unit string1.000
Hallucinated date present0.333
Distinct outputs (AH task)3
Distinct outputs (temp/RH task)5
Distinct outputs (pollutant task)1

Interpretation: the checkpoint is a working text generator for this domain's templates, but it is not a reliable numeric estimator. Do not use it as one.


6. Prompting format

The model expects raw instruction text ending in Response: — for example:

Task: Predict the absolute humidity given the following parameters: Date: 11/03/2004, Time: 02.00.00, CO(GT): 0.9, NOx(GT): 45.0, NO2(GT): 60.0. Response:

Do not wrap the prompt in <|im_start|>…<|im_end|> ChatML markers. The repository intentionally omits chat_template.jinja for this reason.

The v3 template {{ .System }}\n{{ .Prompt }} prepends an optional system instruction; when none is supplied, the prompt is unchanged from v2 and the model behaves exactly as the v2 checkpoint does.


7. Limitations

  • Numeric accuracy. Absolute-humidity error is one to two orders of magnitude worse than the closed-form formula. Values the model writes are not trustworthy measurements.
  • Near-constant predictions. Low output diversity on the numeric tasks; the same inputs tend to produce the same digit strings.
  • Hallucinated dates. Present in roughly one third of checked v2 generations.
  • 128-token context. Long prompts are truncated; the model was not trained beyond this window.
  • No v3 evaluation. v3 has never been benchmarked; its template change is untested against v2 on the evaluation set.
  • Narrow domain. Trained on one Italian urban monitoring station (2004–2005) with metal-oxide sensors. Not a general air-quality model, not a forecasting model, and not calibrated for other cities or sensor hardware.
  • Application caveat. In the full project application, numeric answers are computed in Python by a proxy layer around Ollama, not by this model. Text returned by that application is therefore not evidence of model capability.

8. Licence and provenance

Released under CC BY 4.0, matching the source dataset's licence terms. Tokenizer derived from Qwen2.5/Qwen3 (Apache 2.0). The dataset DOI is 10.24432/C59K5F.

Per-file SHA-256 checksums, the provenance of each binary, and the list of files deliberately excluded from this repository are in FILES_AND_CHECKSUMS.md.

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

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

GPU в ailist

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

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

Подбираем GPU…

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

0 моделей