/ Модель

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

Контекст
131 072 токена
Параметры
2,2 млрд
Лицензия
Apache 2.0
Архитектура
llama · dense
Базовая модель
sepalith-2b-cpt
Библиотека
transformers
Опубликована
24 ноя 2026

sepalith-2b-nes

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

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

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

Локальная модель Sepalith для предложения и переписывания фрагментов кода на R в VS Code и Positron.

Sepalith 2B NES — локальная модель следующего предложения правок кода на R, разработанная для Sepalith. Она получает код вокруг курсора и предлагает переписать выделенный участок либо оставить его без изменений. Модель предназначена для дополнения и редактирования R-кода в редакторах VS Code и Positron через расширение Sepalith и сервер llama.cpp; для неё нужен специальный формат обычного completion-запроса, а не чатовый интерфейс.

Модель основана на LlamaForCausalLM и дообучена на базе scholzmx/sepalith-2b-cpt, которая прошла продолженное предобучение на R-коде. В README указано около 2,5 млрд параметров, тогда как метаданные каталога указывают 2,2 млрд; доступны веса Safetensors и варианты GGUF Q6_K и Q4_K_M. Контекст — до 131 072 токенов. Модель обучалась только для R. Лицензия — Apache-2.0.

На отложенной выборке точность полностью правильных правок составила около 41%; длинные переписывания тел функций часто оказываются неверными, поэтому результат следует проверять. Модель не обучалась в формате чата: встроенный общий chat template не соответствует её обучению, и чатовые интерфейсы могут давать плохие результаты. Это хобби-проект, проверенный в указанной конфигурации llama.cpp на CPU.

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

  • предложение следующей правки R-кода у курсора
  • завершение блока кода на R
  • переписывание R-кода в цепочку pipe
  • переименование объектов и переменных в R-коде
  • предложение оставить код без изменений

Ограничения

На отложенной выборке около 41% правок были полностью правильными; длинные переписывания тел функций часто ошибочны, поэтому предложения требуют проверки. Модель обучалась только на R и не предназначена для чатового режима; для корректной работы нужен её специальный формат completion-запроса.

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

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

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

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

Источники: 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

Sepalith 2B NES

A small, local-first next-edit-suggestion model for R. You give it the code around your cursor and it rewrites the current region, or says that no edit is needed. It was built for Sepalith and runs on a laptop CPU or iGPU through llama.cpp.

This is a hobby project. It is not a chat model and it does not follow instructions outside its prompt format.

Files

FileSizeUse
sepalith-2b-nes-Q6_K.gguf2.20 GBDefault. Passed the quant gate against bf16.
sepalith-2b-nes-Q4_K_M-mixB.gguf1.66 GBSmall tier. See the no-op note below.
model.safetensors + configs5.03 GBbf16 weights for transformers.

SHA256:

  • Q6_K: 6593785330b99076b80ae3ac679bda76c5fcff1ebd1873f46f944c1ec43a3261
  • Q4_K_M-mixB: e24fbfbc5ea47c88647445ec682196fc67af9134d4fa36e826beeda045f1c71b
  • model.safetensors: 4a43ece2c6d86e77b929b0d6771fdb2e42e609e4b6665073851d761f1f5ac055

How it was trained

  1. Base: openbmb/MiniCPM5-2B-Midtrain.
  2. Continued pretraining on about 472M tokens of permissively licensed R code: scholzmx/sepalith-2b-cpt, step 11,586.
  3. Editing SFT on R edit examples built from CRAN packages (finish a block, rewrite to a pipe, rename, no-op, and others).
  4. Two rounds of GRPO with an execution reward: the model's edit is run against the function's tests in R. This release is checkpoint 100 of the second round.

Architecture: LlamaForCausalLM, 42 layers, hidden size 2048, vocabulary 130,560, about 2.5B parameters.

Use it in VS Code or Positron

The Sepalith extension runs a local llama-server and shows suggestions as ghost text, or as a diff preview for rewrites. It renders the prompt below byte for byte. It is not on the marketplace yet, so build it from the repository:

git clone https://github.com/sims1253/Sepalith
cd Sepalith/extensions/vscode-sepalith
npm ci && npm run build
npx @vscode/vsce package --allow-missing-repository
code --install-extension vscode-sepalith-0.1.0.vsix   # Positron: Extensions view, Install from VSIX

Then point it at a llama.cpp llama-server binary (absolute path):

{ "sepalith.serverPath": "/path/to/llama.cpp/build/bin/llama-server" }

On first start the extension downloads sepalith-2b-nes-Q6_K.gguf from this repo and checks its size and SHA256. To use the small tier, download it and set sepalith.modelPath to its absolute path.

llama.cpp b10453 (3cb7ffb1a) is the tested build. Open an R file and pause typing, or press Alt+\ to ask for a suggestion. Tab accepts ghost text and Alt+Enter applies a previewed rewrite.

The extension was tested end to end against the Q6_K file on CPU: on 8 sample contexts its prompt token IDs matched training exactly, and every answer parsed. Zed is not supported: its built-in zeta2 prompt is a different format.

Prompt format

Send raw text to a completion endpoint, not a chat endpoint (see Chat template below).

The prompt (renderer zeta2-prm03-v1) looks like this. <|user_cursor|> marks the cursor inside the current region, and the prompt ends with a newline after <[fim-middle]>:

Edit the current region. Output the complete replacement region, preserving whitespace. For no change, output the ordinary line [NO_EDIT] followed by the exact terminal line >>>>>>> UPDATED; an empty body is reserved for deletion of a nonempty range.
<filename>R/example.R
f <- function(x) {
<filename>selected_references
<filename>edit_history
<filename>diagnostics
<filename>retrieval
<[fim-suffix]>
  value
}
<<<<<<< CURRENT
  value <- sum(x)<|user_cursor|>
=======
<[fim-middle]>

The sections are:

  • Header: the fixed instruction line, then <filename> with the file path and the lines above the region.
  • Context slots: selected_references, edit_history, diagnostics and retrieval. They may be empty, but they must be present. Edit history uses the form User edited "R/f.R": followed by a diff hunk.
  • Suffix: the lines below the region, after <[fim-suffix]>.
  • Region: the lines to edit, between <<<<<<< CURRENT and =======. An empty region is an insertion point.

The model answers with the full new region followed by >>>>>>> UPDATED, or [NO_EDIT] and the same terminal line. An empty body means "delete the region".

Tokenization rules (the markers are plain text, not special tokens):

  • Encode the prompt without parsing special tokens and without adding BOS.
  • Prepend exactly one BOS (id 0) yourself.
  • Decode greedily with a 1,024-token cap, and stop on id 1 or 130073. Only a stop on id 1 counts as a finished answer.

The reference implementation is render_prompt, encode_prompt and parse_output in sepalith.campaign_protocol.

llama.cpp

llama-server -m sepalith-2b-nes-Q6_K.gguf -c 8192 --port 8080
# prompt.txt holds the rendered prompt, ending in "<[fim-middle]>\n"
IDS=$(jq -Rs '{content: ., add_special: false, parse_special: false}' prompt.txt \
  | curl -s localhost:8080/tokenize -d @- | jq -c '[0] + .tokens')
jq -n --argjson ids "$IDS" \
  '{prompt: $ids, n_predict: 1024, temperature: 0, top_k: 1, samplers: ["top_k"]}' \
  | curl -s localhost:8080/completion -d @- | jq -r .content

Sending token IDs keeps the input exact. A plain string prompt gives the same tokens for ordinary code, because the server adds the same single BOS. But if your source contains special-token text such as <|im_start|>, the server would then parse it as a control token.

transformers

import torch
from transformers import AutoModelForCausalLM, AutoTokenizer

tok = AutoTokenizer.from_pretrained("scholzmx/sepalith-2b-nes")
model = AutoModelForCausalLM.from_pretrained("scholzmx/sepalith-2b-nes", dtype=torch.bfloat16)

ids = torch.tensor([[0] + tok.encode(prompt, add_special_tokens=False, split_special_tokens=True)])
out = model.generate(ids, attention_mask=torch.ones_like(ids), max_new_tokens=1024,
                     do_sample=False, eos_token_id=[1, 130073])
print(tok.decode(out[0, ids.shape[1]:], skip_special_tokens=True))

Chat template

This model has no chat template of its own, and it was not trained on chat.

  • GGUF files: they carry the base model's generic chat template in tokenizer.chat_template (SHA256 cc945752db555d60949b16989df4ccfeb52a313d6b4b5c5229dd786e2e9fcf1c), which llama.cpp's conversion step copies over. It adds role markers, an assistant prefix and tool-calling text. The model never saw these during editing SFT or GRPO. So /v1/chat/completions, llama-cli chat mode, Ollama or LM Studio's chat view will give poor results.
  • transformers files: no template is included, so apply_chat_template fails on purpose.

Use a raw completion request as shown above.

Evaluation

Held-out panel (240 cases, built from CRAN packages never used in training or model selection, scored once):

ModelCorrectRate (95% CI)
Editing-SFT parent (before GRPO)100 / 24041.7% [32.8, 50.6]
This model, bf1698 / 24040.8% [32.4, 49.4]
This model, Q6_K97 / 24040.4% [31.9, 48.9]

All three got 39 of 50 no-op cases right. The differences are not significant. GRPO did not improve edit accuracy on this panel.

Execution hold-out (3,803 function-completion tasks, 630 functions): all tests pass for 39.9% [38.1, 41.8] of tasks, against 39.2% for the previous checkpoint.

Quantization (250-case dev panel vs. bf16):

TierCorrect / 250Mean KLDNote
bf161120
Q6_K1110.0037Passed all gate checks
Q4_K_M-mixB1100.0236False no-ops rose from 10 to 15 (+2.0 pp), above the 1.0 pp gate

The small tier says "no edit" a little more often when an edit was wanted. It was accepted anyway, because a missed suggestion costs less than a wrong one.

Latency (AMD Ryzen 5 PRO 5650U notebook, 8 threads, prompts of 131 to 4,227 tokens, p50):

TierCPU first tokenVulkan iGPU first token
Q6_K7.1 s2.2 s
Q4_K_M-mixB5.3 s2.1 s

Time to first token is mostly prompt prefill, so short prompts are much faster than these medians.

Limitations

  • R only. Other languages were not trained or tested.
  • About 41% of edits on the held-out panel are exactly right. Treat the output as a suggestion.
  • Long rewrites (whole function bodies) are rarely correct.
  • Editor support: VS Code and Positron through the extension above. Zed is not supported.

License

Apache-2.0, like the base model. The training data was restricted to R packages with permissive licenses; provenance is in the scholzmx/sepalith dataset.

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

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

GPU в ailist

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

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

Подбираем GPU…

Класс архитектуры
LlamaForCausalLM
Ревизия весов
082a5c5

0 моделей