/ Модель

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

Контекст
2 048 токенов
Параметры
57,6 млн
Лицензия
Apache 2.0
Архитектура
mixtral · MoE
Базовая модель
tinybrainbot-360m-a75m-v5.1-base
Библиотека
transformers
Опубликована
5 ноя 2026

tinybrainbot-360m-a75m-v5.1-python

Генерация текстаТекст → текст3 профессии

Небольшая англоязычная MoE-модель для генерации и исправления короткого кода на Python.

1 005скачиваний за 30 дней3лайкавеса обновлены5 ноя 2026

Бенчмарки

Как модель справилась с задачами пользователей ailist и что о ней публикуют открытые лидерборды

Тесты пользователейпока нет

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

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

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

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

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

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

    Модели ответят на каждую задачу, судья оценит ответы. Опубликованный результат появится на этой странице.

Публичные оценки

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

В подключённых источниках результатов для этой модели пока нет.

Что умеет модель

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

TinyBrainBot-360M-A75M-v5.1-Python — небольшая англоязычная модель-ассистент для программирования на Python, разработанная автором репозитория nkthebass. Это дообученная MoE-модель архитектуры Mixtral: в README указаны 383 млн параметров и 75 млн активных параметров на токен, тогда как метаданные каталога указывают 57,6 млн параметров. Модель загружается через Transformers как MixtralForCausalLM; доступны веса Safetensors и варианты GGUF, включая F16, Q4_K_M и Q8_0. Контекст — 2048 токенов.

Модель предназначена прежде всего для генерации коротких функций на Python и исправления очевидных ошибок в коде. Её дообучали на коде и инструкциях по Python, а затем на ответах, прошедших модульные тесты; специальная обработка токенизатора сохраняет отступы Python. Она справляется с простыми задачами на строки, списки, циклы, рекурсию и бинарный поиск, но заметно слабее в многошаговых задачах, объяснении кода и написании тестов. Генерация может зацикливаться без подходящих настроек выборки, а результаты следует запускать и проверять. Лицензия репозитория — Apache-2.0; README отдельно предупреждает, что датасеты имеют собственные условия, включая CC BY-NC 4.0 для KodCode-V1, поэтому для коммерческого использования нужно проверить лицензии данных.

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

  • написание коротких функций на Python
  • исправление очевидных ошибок в Python-коде
  • добавление аннотаций типов и docstring к функции
  • решение простых задач на строки, списки и циклы
  • реализация рекурсии и бинарного поиска

Ограничения

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

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

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

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

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

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

Открыть на Hugging Face

TinyBrainBot-360M-A75M-v5.1-Python

A tiny Python coding assistant. The v5.1 360M-A75M mixture-of-experts model (383M parameters, 24 experts per layer, 4 active, so 75M parameters work per token), trained further on Python: a 2B-token code anneal, a Python instruction SFT, and one round of rejection-sampling fine-tuning where it learned from its own answers that passed unit tests. Ask it for a function or paste broken code; it answers with a ```python block. It loads as a standard MixtralForCausalLM.

You:

This function should return the sum of the even numbers, but it's wrong. Fix it:

def sum_even(nums):
    total = 0
    for n in nums:
        if n % 2 == 1:
            total += n
    return total

TinyBrainBot:

The issue with the previous function is that it's not checking if the number is even or not. It's checking if the number is divisible by 2 without a remainder.

Here's the corrected function:

def sum_even(nums):
    total = 0
    for n in nums:
        if n % 2 == 0:
            total += n
    return total

This function works by iterating through each number in the input list and checking if it's even. If it is, it adds it to the total. Finally, it returns the total sum.


You:

Write a function that returns the factorial of n.

TinyBrainBot:

Here is the code to solve this problem:

def factorial(n):
    if n == 0:
        return 1
    else:
        return n * factorial(n-1)

You:

Now add type hints and a docstring.

TinyBrainBot:

Here's a revised version of the function:

def factorial(n: int) -> int:
    """
    Returns the factorial of n.

    Args:
        n (int): The input integer.

    Returns:
        int: The factorial of n.

    Raises:
        TypeError: If n is not an integer.
    """
    if not isinstance(n, int):
        raise TypeError("Input must be an integer.")
    if n < 0:
        raise ValueError("Input must be a non-negative integer.")
    if n == 0:
        return 1
    return n * factorial(n-1)

Code benchmarks

All four models were run through the same harness: chat mode (the task goes in the chat template, the answer's


| Model | Params | Training tokens | HumanEval | MBPP |
|---|---|---|--:|--:|
| **TinyBrainBot-360M-A75M-v5.1-Python (this)** | 383M (75M active) | 20B | 14.6 | 32.7 |
| [SmolLM2-360M-Instruct](https://huggingface.co/HuggingFaceTB/SmolLM2-360M-Instruct) | 362M | 4T | 16.5 | 33.5 |
| [SmolLM2-135M-Instruct](https://huggingface.co/HuggingFaceTB/SmolLM2-135M-Instruct) | 135M | 2T | 7.9 | 10.9 |
| [Qwen2.5-Coder-0.5B-Instruct](https://huggingface.co/Qwen/Qwen2.5-Coder-0.5B-Instruct) | 494M | Qwen2.5 + 5.5T code | 52.4 | 46.3 |

It lands next to SmolLM2-360M-Instruct after about 1/200th of the training data. Qwen2.5-Coder-0.5B is a bigger,
code-specialized model trained on trillions of tokens; it's here as a reference point, not a peer.

| General benchmarks (0-shot, full set) | acc_norm | *(raw acc)* |
|---|--:|--:|
| HellaSwag | 37.49 | *32.59* |
| ARC-Easy | 57.74 | *61.45* |
| ARC-Challenge | 34.64 | *33.28* |
| PIQA | 65.67 | *64.58* |
| ArithMark-3 | 46.60 | *46.60* |
| Open SLM Leaderboard Intelligence Index | 26.02 | *24.06* |

30 unedited answers (15 requests, greedy and sampled, with pass/fail) are in [`code_samples.md`](code_samples.md).

## Quick start

```python
from transformers import AutoModelForCausalLM, AutoTokenizer
repo = "nkthebass/tinybrainbot-360m-a75m-v5.1-python"
tok = AutoTokenizer.from_pretrained(repo)
model = AutoModelForCausalLM.from_pretrained(repo)
msgs = [{"role": "user", "content": "Write a function is_prime(n) that returns True if n is prime."}]
ids = tok.apply_chat_template(msgs, add_generation_prompt=True, return_tensors="pt")
out = model.generate(ids, max_new_tokens=400)        # defaults from generation_config.json
text = tok.decode(out[0], skip_special_tokens=True)  # decode WITH the prompt, then cut it off (see below)
print(text[len(tok.decode(ids[0], skip_special_tokens=True)):].strip())

Decode the answer together with the prompt and cut the prompt off, like above. The tokenizer's decoder drops one leading space from whatever it decodes, so decoding only the new tokens can turn the first 4-space indent into 3.

GGUF (llama.cpp, LM Studio, Jan, Ollama): Q8_0 (409 MB), Q4_K_M (239 MB) or F16 (768 MB). The chat template is embedded, prompts with indented code tokenize exactly like transformers, and greedy F16 output matches transformers.

llama-cli -m tinybrainbot-360m-a75m-v5.1-python-Q8_0.gguf -cnv --temp 0.4 --top-p 0.9 --repeat-penalty 1.15 --logit-bias 241-inf --logit-bias 255-inf

Recommended sampling: temperature 0.4, top-p 0.9, repetition penalty 1.15 (the generation_config.json defaults). Plain greedy decoding without a repetition penalty can get stuck repeating itself on questions that aren't code.

How it was made

StageTokensData
Code anneal (from v5.1-Base)2.0B45% codeparrot-clean, 25% OpenCoder annealing corpus (algorithmic Python + synthetic Q&A), 5% the-stack-smol Python, 25% replay of the v5.1 base's last training stage
Python SFT262M70% Python instructions (OpenCoder SFT stage 2, self-oss-instruct-sc2, Tested-143k-Python-Alpaca, Magicoder OSS-Instruct), 30% the v5.1-Instruct chat mix
Rejection-sampling fine-tune35M40% the model's own answers that passed unit tests, 30% Python SFT, 30% chat mix

Indentation. The TinyBrainBot tokenizer used to collapse all leading spaces, which makes Python impossible: the v5.1 base scores 0.0 on both benchmarks because every function body loses its indentation. For this model each run of 4 spaces is one token (" ", id 24) and tabs become 4 spaces, so indentation survives training and generation.

Rejection sampling. 26,480 Python problems from KodCode-V1 (easy and medium, one function each, unit tests checked against the reference solution), 8 attempts each. 21% of the attempts passed their tests; 12,419 problems got at least one pass. Up to two distinct passing answers per problem (17,080 total) went back into training.

Contamination. Every SFT and RFT example that shares a 13-word sequence with HumanEval (prompts, solutions, tests) or any MBPP split was dropped, as were KodCode problems that KodCode itself flags as close to a benchmark. No benchmark data was trained on.

Licenses: KodCode-V1 is CC BY-NC 4.0, and the code corpora carry their own source licenses; check those terms before any commercial use.

Limitations

  • It's a 75M-active-parameter model. It handles short, single-function tasks (string and list processing, simple loops, recursion, binary search, fixing an obvious bug), but tasks with several steps often come out wrong: a class with error handling, reading a CSV, sorting a dict by value all failed in the samples.
  • It explains code badly. Asked "what does this code do?", it tends to write different code instead.
  • Asked for tests, it writes a few asserts, sometimes with wrong expected values.
  • Greedy decoding can loop on non-code questions; use the recommended sampling.
  • Python only. English only. 2,048-token context. Two or more spaces inside a line (not at the start) collapse into one.
  • Like any model this size, it makes things up. Run the code before you trust it.

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

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

GPU в ailist

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

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

Подбираем GPU…

Класс архитектуры
MixtralForCausalLM
Ревизия весов
edd5966

0 моделей