Run this model with HF Jobs

Run infosave/flint-v1.1-cmf on Hugging Face's managed compute, monitor its progress, and retrieve the results when it's done.

Paste one of these prompts into your coding agent:

Fine-tune on my dataset

Use HF Jobs to fine-tune https://huggingface.co/infosave/flint-v1.1-cmf. Ask me which dataset to train on, then push the fine-tuned model to a new model repo. Run `hf jobs --help` first to learn the CLI.

Run batch inference

Use HF Jobs to run batch inference with https://huggingface.co/infosave/flint-v1.1-cmf on the inputs in a mounted HF Bucket. Ask me which Bucket to use, then write the outputs back to it and keep each input ID. Run `hf jobs --help` first to learn the CLI.

Evaluate on a benchmark

Use HF Jobs to evaluate https://huggingface.co/infosave/flint-v1.1-cmf. Ask me which benchmark to run, then save the scores and the per-example results to a new dataset repo. Run `hf jobs --help` first to learn the CLI.

Recursive Flint 1.1 — CMF

Recursive Flint 1.1 is Recursive's mixture-of-experts model for coding agents: 39.8B parameters, about 2.5B of them active per token, a new post-training of the Flint base. This repository holds it as two standalone CMF files for cortiq, a Rust inference engine with no Python and no ML framework.

Measured on an NVIDIA L4 (24 GB):

  • CUDA: q2tp decodes at 92–95 tok/s and q4tp at 89–93; a 4 096-token prompt is read in 2.4 s. With q2tp a 65 536-token prompt stays on the card (17.9 GB) and decodes at 41.7 tok/s after it.
  • Vulkan, the same card: q2tp decodes at 60–70 tok/s and q4tp at 50–63 (the rate varied between runs); a 4 096-token prompt is read in 4.3 s. q2tp reads 16 384 tokens in 20.2 s within 16.5 GB; on a 24 GB card q4tp runs up to 8 192 tokens.
  • Accuracy: against an independent PyTorch f32 forward on each file's own weights, mean KL 0.005–0.020 on both backends.

English · Русский · 中文

Quick start

An NVIDIA card through CUDA:

cargo install cortiq-cli --features cuda
hf download infosave/flint-v1.1-cmf flint-v1.1-q2tp.cmf flint-v1.1-q2tp.cmf.sha256 --local-dir .
sha256sum -c flint-v1.1-q2tp.cmf.sha256          # macOS: shasum -a 256 -c flint-v1.1-q2tp.cmf.sha256
CMF_GPU=cuda cortiq run flint-v1.1-q2tp.cmf --no-think --greedy --max-tokens 512 \
  --prompt "Write a concise Python function merge_intervals(intervals) that merges overlapping intervals."

Vulkan, DX12 or Metal (a build without CUDA):

cargo install cortiq-cli
CMF_GPU=wgpu CMF_GPU_WGPU_GRAPH=1 cortiq run flint-v1.1-q2tp.cmf --no-think --greedy --max-tokens 512 \
  --prompt "Write a concise Python function merge_intervals(intervals) that merges overlapping intervals."

Use cortiq 0.9.27 or newer. --no-think closes the reasoning block before the answer, though Flint 1.1 may still outline its plan in the answer; without it Flint decides on each turn whether to reason first. The upstream sampling settings (temperature 1.0, top-p 0.95, top-k 20) are stored in the file and apply when a run does not pass --greedy or its own values. For hard tasks the upstream card recommends an output budget of at least 32 768 tokens, reasoning included.

Server

cortiq serve puts the file behind an OpenAI-compatible HTTP API, with a web dashboard on the same port.

CMF_GPU=cuda cortiq serve flint-v1.1-q2tp.cmf --port 8080 --host 127.0.0.1      # NVIDIA, CUDA
cortiq serve flint-v1.1-q2tp.cmf --port 8080 --host 127.0.0.1                   # Vulkan, DX12, Metal
curl http://127.0.0.1:8080/v1/chat/completions -H "Content-Type: application/json" -d '{
  "model": "flint-v1.1",
  "messages": [{"role": "user", "content": "Write a Python function that checks whether a string is a palindrome."}],
  "max_tokens": 512,
  "temperature": 0,
  "enable_thinking": false,
  "stream": true
}'

Any OpenAI client works with base_url="http://127.0.0.1:8080/v1" and any API key:

from openai import OpenAI

client = OpenAI(base_url="http://127.0.0.1:8080/v1", api_key="none")
r = client.chat.completions.create(
    model="flint-v1.1",
    messages=[{"role": "user", "content": "Explain what a bounded LRU cache is."}],
    extra_body={"enable_thinking": False},
)
print(r.choices[0].message.content)
endpoint what it does
POST /v1/chat/completions a chat turn; stream: true sends the answer as it is decoded, tools lets the model call functions
POST /v1/completions the continuation of a prompt
GET /v1/models the served model
GET /healthz 200 while the server is up
GET / the web dashboard
  • CMF_MAX_SEQ is the longest conversation a request may hold, 32 768 tokens by default (the model is configured for 262 144).
  • temperature: 0 decodes greedily; enable_thinking: false asks for a direct answer.
  • --host 127.0.0.1 keeps the server local; the default is every interface, and no API key is checked.

Files

file bytes SHA-256 weights use it when
flint-v1.1-q2tp.cmf 14 649 366 680 893c5565e0bb4118d543574dfc5bcd024350fff28de0e75ece8249deff754ec0 routed experts' gate_proj/up_proj in q2tp; routed down_proj, the shared expert, attention, embeddings and lm_head in q4tp; norms, router and sinks in f16 the default: it fits a 24 GB card with room for the KV cache
flint-v1.1-q4tp.cmf 20 957 599 896 0ecdf461a72bf986dc77fb9ee6279f5610d70462f559dcd636c02f5aae4209cc every matrix in q4tp; norms, router and sinks in f16 fidelity comes first and the card has room to spare

The q2tp profile is the one Flint's q2tp shipped with, tensor for tensor.

Both files carry the same tokenizer, chat template, geometry and source revision (db1fdc0f). cortiq verify FILE checks every tensor's hash.

What the runtime executes

property Flint 1.1
layers 49: 2 with a dense SwiGLU FFN, then 47 mixture-of-experts layers; all 49 have attention
attention 35 sliding-window layers (513 positions: the current token and 512 before it) and 14 full-attention layers
positions, sinks RoPE only on the 35 sliding layers; the 14 full layers have none; a learned per-head attention sink on every layer
heads 32 query heads, 4 key/value heads, head dimension 128, per-head QK RMSNorm
experts 256 routed, 6 a token, width 512, plus an always-active shared SwiGLU expert of width 1024
routing sigmoid scores, top 6, the selected scores renormalized to sum to one
vocabulary, context 150 144 tokens; configured for 262 144

Accuracy

An independent PyTorch forward in f32, written from the upstream SGLang model code, scored 32 answer positions after an 819-token code-review prompt (teacher-forced), once on each file's own decoded weights (cortiq dequant) and once on the original bf16 weights:

file backend top-1, same weights mean KL, same weights top-1, bf16 weights mean KL, bf16 weights
q2tp CUDA 32/32 0.005 22/32 0.55
q2tp Vulkan 32/32 0.008 22/32 0.54
q4tp CUDA 30/32 0.020 21/32 0.43
q4tp Vulkan 31/32 0.019 22/32 0.44

The first pair of columns checks the runtime: both backends reproduce the weights in the file. The second pair adds the quantization: on confident positions the KL stays near zero, and it grows where the model weighs several continuations. One prompt with a fixed answer is a check, not a quality benchmark.

Performance

Both backends ran on one NVIDIA L4 (24 GB, Google Colab) with cortiq bench FILE --core --tokens 128 --ctx N: the first token after an N-token prompt, the steady decode rate of the 128 tokens after it, and the card's peak memory (nvidia-smi).

CUDA · NVIDIA L4

Stand: NVIDIA L4 (24 GB), Google Colab, CMF_GPU=cuda on a CUDA build. Without a prompt: 92–95 tok/s for q2tp, 89–93 for q4tp.

Both files on CUDA

prompt, tokens first token, s (q2tp) first token, s (q4tp) decode, tok/s (q2tp) decode, tok/s (q4tp) peak card memory, GB (q2tp) peak card memory, GB (q4tp)
1 024 0.72 0.87 92.0 89.4 15.0 20.9
4 096 2.37 2.38 86.2 83.8 15.3 21.1
16 384 12.1 12.8 71.6 64.4 15.9 21.0
32 768 32.0 33.5 58.5 32.1 16.7 21.6
65 536 100.5 — 41.7 — 17.9 —

On a 24 GB card q4tp keeps every weight on the card up to about 10 000 tokens of context; past that part of its routed experts is read from host memory. For long prompts on such a card, use q2tp.

Vulkan · NVIDIA L4

Stand: the same L4, CMF_GPU=1 (wgpu over Vulkan). Without a prompt: 60–70 tok/s for q2tp, 50–63 for q4tp; the same build varied by up to 15 % between runs on this card, and the table is one series of runs.

Both files on Vulkan

prompt, tokens first token, s (q2tp) first token, s (q4tp) decode, tok/s (q2tp) decode, tok/s (q4tp) peak card memory, GB (q2tp) peak card memory, GB (q4tp)
1 024 1.06 1.19 60.2 53.7 15.6 21.2
4 096 4.26 4.66 55.7 51.7 15.9 21.4
8 192 9.04 9.71 50.0 47.6 16.1 21.7
16 384 20.2 — 40.6 — 16.5 —

On Vulkan q4tp's weights take the card's whole weight budget: on a 24 GB card a 16 384-token prompt runs out of card memory and the run stops with an error. For long prompts there, use q2tp.

Apple silicon

Metal was not measured for this release.

Limits

  • Text in, text out. Tool calls come out as text in Flint's format (<tool_call>…</tool_call>); running them, permissions and sandboxing belong to the application.
  • Generated code can be wrong or unsafe: run its tests and review it before use.
  • The configured 262 144-token context is a model field, not a measured guarantee of quality, latency or fit on a given card.

License

The weights are Recursive's, under Apache-2.0; this package derives from RecursiveSI/flint-v1.1 revision db1fdc0fbffecf3b1df4fa2b0d44b75e5237e469. CMF and cortiq are Apache-2.0. The first Flint release is at infosave/flint-cmf.


Документация на русском

Recursive Flint 1.1 — MoE-модель Recursive для агентов, пишущих код: 39,8 млрд параметров, из них около 2,5 млрд активны на токен; новое дообучение той же базы, что у Flint. Здесь она в виде двух самостоятельных CMF-файлов для cortiq — движка на Rust без Python и ML-фреймворков.

Измерено на NVIDIA L4 (24 ГБ):

  • CUDA: q2tp генерирует 92–95 ток/с, q4tp — 89–93; промпт из 4 096 токенов читается за 2,4 с. С q2tp промпт из 65 536 токенов остаётся на карте (17,9 ГБ), генерация после него — 41,7 ток/с.
  • Vulkan на той же карте: q2tp генерирует 60–70 ток/с, q4tp — 50–63 (скорость менялась от запуска к запуску); промпт из 4 096 токенов читается за 4,3 с. q2tp читает 16 384 токена за 20,2 с в 16,5 ГБ; на карте 24 ГБ q4tp работает до 8 192 токенов.
  • Точность: против независимого прямого прохода PyTorch в f32 на собственных весах каждого файла средний KL 0,005–0,020 на обоих бэкендах.

Быстрый старт

NVIDIA через CUDA:

cargo install cortiq-cli --features cuda
hf download infosave/flint-v1.1-cmf flint-v1.1-q2tp.cmf flint-v1.1-q2tp.cmf.sha256 --local-dir .
sha256sum -c flint-v1.1-q2tp.cmf.sha256          # macOS: shasum -a 256 -c flint-v1.1-q2tp.cmf.sha256
CMF_GPU=cuda cortiq run flint-v1.1-q2tp.cmf --no-think --greedy --max-tokens 512 \
  --prompt "Напиши компактную Python-функцию merge_intervals(intervals), объединяющую пересекающиеся интервалы."

Vulkan, DX12 или Metal (сборка без CUDA):

cargo install cortiq-cli
CMF_GPU=wgpu CMF_GPU_WGPU_GRAPH=1 cortiq run flint-v1.1-q2tp.cmf --no-think --greedy --max-tokens 512 \
  --prompt "Напиши компактную Python-функцию merge_intervals(intervals), объединяющую пересекающиеся интервалы."

Нужен cortiq 0.9.27 или новее. --no-think закрывает блок рассуждения перед ответом, но Flint 1.1 может изложить план в самом ответе; без флага Flint сам решает, рассуждать ли перед ответом. Настройки сэмплинга автора (temperature 1.0, top-p 0.95, top-k 20) записаны в файл и действуют, если запуск не задаёт --greedy или свои значения. Для сложных задач автор советует бюджет не меньше 32 768 выходных токенов вместе с рассуждением.

Сервер

cortiq serve отдаёт файл через HTTP API, совместимый с OpenAI, и веб-панель на том же порту.

CMF_GPU=cuda cortiq serve flint-v1.1-q2tp.cmf --port 8080 --host 127.0.0.1      # NVIDIA, CUDA
cortiq serve flint-v1.1-q2tp.cmf --port 8080 --host 127.0.0.1                   # Vulkan, DX12, Metal
curl http://127.0.0.1:8080/v1/chat/completions -H "Content-Type: application/json" -d '{
  "model": "flint-v1.1",
  "messages": [{"role": "user", "content": "Напиши функцию на Python, проверяющую, что строка — палиндром."}],
  "max_tokens": 512,
  "temperature": 0,
  "enable_thinking": false,
  "stream": true
}'

Подходит любой клиент OpenAI с base_url="http://127.0.0.1:8080/v1" и любым ключом. Эндпоинты: POST /v1/chat/completions (чат; stream: true — потоком, tools — вызовы функций), POST /v1/completions, GET /v1/models, GET /healthz, GET / (веб-панель). CMF_MAX_SEQ — самый длинный диалог запроса, по умолчанию 32 768 токенов (модель рассчитана на 262 144); --host 127.0.0.1 оставляет сервер локальным, ключ API не проверяется.

Файлы

файл байт SHA-256 веса когда брать
flint-v1.1-q2tp.cmf 14 649 366 680 893c5565e0bb4118d543574dfc5bcd024350fff28de0e75ece8249deff754ec0 gate_proj/up_proj маршрутизируемых экспертов — q2tp; их down_proj, общий эксперт, внимание, эмбеддинги и lm_head — q4tp; нормы, роутер и sinks — f16 по умолчанию: помещается в карту на 24 ГБ с запасом под KV-кэш
flint-v1.1-q4tp.cmf 20 957 599 896 0ecdf461a72bf986dc77fb9ee6279f5610d70462f559dcd636c02f5aae4209cc все матрицы — q4tp; нормы, роутер и sinks — f16 точность важнее, а памяти на карте с запасом

Профиль q2tp тот же, что у q2tp первого Flint, тензор в тензор.

У обоих файлов одни и те же токенизатор, шаблон чата, геометрия и ревизия исходника (db1fdc0f). cortiq verify FILE проверяет хеш каждого тензора.

Что исполняет движок

  • 49 слоёв: 2 с плотным SwiGLU FFN и 47 MoE; attention во всех 49.
  • 35 слоёв со скользящим окном 513 позиций (текущий токен и 512 до него) и 14 слоёв полного внимания.
  • RoPE только в 35 скользящих слоях, в 14 полных его нет; в каждом слое обученный sink на голову.
  • 32 головы запросов, 4 головы ключей/значений, размер головы 128, RMSNorm на Q и K по головам.
  • 256 экспертов, 6 на токен, ширина 512, плюс всегда активный общий SwiGLU-эксперт ширины 1024.
  • Маршрутизация: сигмоида, top-6, выбранные веса нормируются до суммы 1.
  • Словарь 150 144 токена; контекст в конфигурации — 262 144.

Точность

Независимый прямой проход PyTorch в f32, написанный по коду модели SGLang от автора, оценил 32 позиции ответа после промпта на 819 токенов (просьба о ревью кода; ответ подставлен принудительно) — на весах самого файла, декодированных cortiq dequant, и на исходных весах bf16:

файл бэкенд top-1, те же веса KL, те же веса top-1, веса bf16 KL, веса bf16
q2tp CUDA 32/32 0,005 22/32 0,55
q2tp Vulkan 32/32 0,008 22/32 0,54
q4tp CUDA 30/32 0,020 21/32 0,43
q4tp Vulkan 31/32 0,019 22/32 0,44

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

Скорость

Оба бэкенда измерены на одной NVIDIA L4 (24 ГБ, Google Colab) командой cortiq bench FILE --core --tokens 128 --ctx N: первый токен после промпта из N токенов, установившаяся скорость генерации 128 токенов после него и пик памяти карты (nvidia-smi).

CUDA · NVIDIA L4

Стенд: NVIDIA L4 (24 ГБ), Google Colab, CMF_GPU=cuda в сборке с CUDA. Без промпта: 92–95 ток/с у q2tp, 89–93 у q4tp.

Оба файла на CUDA

промпт, токенов первый токен, с (q2tp) первый токен, с (q4tp) генерация, ток/с (q2tp) генерация, ток/с (q4tp) пик памяти карты, ГБ (q2tp) пик памяти карты, ГБ (q4tp)
1 024 0,72 0,87 92,0 89,4 15,0 20,9
4 096 2,37 2,38 86,2 83,8 15,3 21,1
16 384 12,1 12,8 71,6 64,4 15,9 21,0
32 768 32,0 33,5 58,5 32,1 16,7 21,6
65 536 100,5 — 41,7 — 17,9 —

На карте 24 ГБ q4tp держит все веса на карте до контекста примерно в 10 000 токенов; дальше часть экспертов читается из памяти хоста. Для длинных промптов на такой карте берите q2tp.

Vulkan · NVIDIA L4

Стенд: та же L4, CMF_GPU=1 (wgpu поверх Vulkan). Без промпта: 60–70 ток/с у q2tp, 50–63 у q4tp; одна и та же сборка на этой карте давала разницу до 15 % между запусками, таблица — одна серия запусков.

Оба файла на Vulkan

промпт, токенов первый токен, с (q2tp) первый токен, с (q4tp) генерация, ток/с (q2tp) генерация, ток/с (q4tp) пик памяти карты, ГБ (q2tp) пик памяти карты, ГБ (q4tp)
1 024 1,06 1,19 60,2 53,7 15,6 21,2
4 096 4,26 4,66 55,7 51,7 15,9 21,4
8 192 9,04 9,71 50,0 47,6 16,1 21,7
16 384 20,2 — 40,6 — 16,5 —

На Vulkan веса q4tp занимают весь бюджет весов карты: на карте 24 ГБ промпту из 16 384 токенов не хватает памяти, и запуск завершается ошибкой. Для длинных промптов там берите q2tp.

Apple silicon

Metal для этого выпуска не измерялся.

Ограничения и лицензия

Текст на входе и на выходе; вызовы инструментов приходят текстом в формате Flint (<tool_call>…</tool_call>), их исполнение и права — дело приложения. Сгенерированный код может быть неверным или небезопасным: запускайте тесты и проверяйте его. 262 144 токена контекста — поле конфигурации модели, а не измеренная гарантия.

Веса — Recursive, Apache-2.0; пакет сделан из RecursiveSI/flint-v1.1 ревизии db1fdc0fbffecf3b1df4fa2b0d44b75e5237e469. CMF и cortiq — Apache-2.0. Первый выпуск Flint: infosave/flint-cmf.


中文说明

Recursive Flint 1.1 是 Recursive 面向编程智能体的混合专家模型: 共 398 亿参数,每个 token 约 25 亿参数处于激活状态,是在 Flint 同一基座上重新进行的后训练。本仓库将其打包为两个独立的 CMF 文件, 供 cortiq 使用:一个 Rust 推理引擎,不需要 Python,也不需要机器学习框架。

在 NVIDIA L4(24 GB)上实测:

  • CUDA: q2tp 生成 92–95 tok/s,q4tp 为 89–93;4 096 个 token 的提示词 2.4 秒读完。使用 q2tp 时, 65 536 个 token 的提示词仍完全放在显卡上(17.9 GB),之后生成 41.7 tok/s。
  • 同一张卡上的 Vulkan: q2tp 生成 60–70 tok/s,q4tp 为 50–63(不同运行之间有波动);4 096 个 token 的提示词 4.3 秒读完。 q2tp 在 16.5 GB 内 20.2 秒读完 16 384 个 token;在 24 GB 显卡上 q4tp 最多支持 8 192 个 token。
  • 准确性: 与在每个文件自身权重上运行的独立 PyTorch f32 前向相比,两个后端的平均 KL 为 0.005–0.020。

快速开始

NVIDIA 显卡(CUDA):

cargo install cortiq-cli --features cuda
hf download infosave/flint-v1.1-cmf flint-v1.1-q2tp.cmf flint-v1.1-q2tp.cmf.sha256 --local-dir .
sha256sum -c flint-v1.1-q2tp.cmf.sha256          # macOS: shasum -a 256 -c flint-v1.1-q2tp.cmf.sha256
CMF_GPU=cuda cortiq run flint-v1.1-q2tp.cmf --no-think --greedy --max-tokens 512 \
  --prompt "用 Python 写一个简洁的函数 merge_intervals(intervals),合并重叠的区间。"

Vulkan、DX12 或 Metal(不带 CUDA 的构建):

cargo install cortiq-cli
CMF_GPU=wgpu CMF_GPU_WGPU_GRAPH=1 cortiq run flint-v1.1-q2tp.cmf --no-think --greedy --max-tokens 512 \
  --prompt "用 Python 写一个简洁的函数 merge_intervals(intervals),合并重叠的区间。"

需要 cortiq 0.9.27 或更新版本。--no-think 会在回答前关闭推理块,但 Flint 1.1 仍可能在回答中先写出思路;不加时由 Flint 在每一轮自行决定是否先推理。 上游的采样设置(temperature 1.0、top-p 0.95、top-k 20)已写入文件,运行时未指定 --greedy 或其他取值时生效。 对于困难任务,上游建议输出预算不少于 32 768 个 token(含推理)。

服务器

cortiq serve 提供与 OpenAI 兼容的 HTTP API,同一端口上还有网页控制台。

CMF_GPU=cuda cortiq serve flint-v1.1-q2tp.cmf --port 8080 --host 127.0.0.1      # NVIDIA,CUDA
cortiq serve flint-v1.1-q2tp.cmf --port 8080 --host 127.0.0.1                   # Vulkan、DX12、Metal
curl http://127.0.0.1:8080/v1/chat/completions -H "Content-Type: application/json" -d '{
  "model": "flint-v1.1",
  "messages": [{"role": "user", "content": "写一个 Python 函数,判断字符串是否为回文。"}],
  "max_tokens": 512,
  "temperature": 0,
  "enable_thinking": false,
  "stream": true
}'

任何 OpenAI 客户端都可以使用,设置 base_url="http://127.0.0.1:8080/v1",API 密钥任意。接口: POST /v1/chat/completions(对话;stream: true 流式输出,tools 用于函数调用)、POST /v1/completions、 GET /v1/models、GET /healthz、GET /(网页控制台)。CMF_MAX_SEQ 是单个请求的最长对话,默认 32 768 个 token(模型配置为 262 144);--host 127.0.0.1 让服务器只在本机可见,不检查 API 密钥。

文件

文件 字节 SHA-256 权重 适用场景
flint-v1.1-q2tp.cmf 14 649 366 680 893c5565e0bb4118d543574dfc5bcd024350fff28de0e75ece8249deff754ec0 路由专家的 gate_proj/up_proj 为 q2tp;路由专家的 down_proj、共享专家、注意力、词嵌入和 lm_head 为 q4tp;归一化、路由器和 sink 为 f16 默认选择:24 GB 显卡可容纳,并为 KV 缓存留有余量
flint-v1.1-q4tp.cmf 20 957 599 896 0ecdf461a72bf986dc77fb9ee6279f5610d70462f559dcd636c02f5aae4209cc 所有矩阵为 q4tp;归一化、路由器和 sink 为 f16 优先保证精度且显存充裕时

q2tp 的量化方案与第一版 Flint 的 q2tp 逐张量一致。

两个文件的分词器、对话模板、结构和源修订版本(db1fdc0f)相同。cortiq verify FILE 会校验每个张量的哈希。

运行时执行的结构

  • 49 层:2 层为稠密 SwiGLU FFN,其后 47 层为混合专家层;49 层都有注意力。
  • 35 层滑动窗口注意力(513 个位置:当前 token 及其前 512 个)与 14 层全注意力。
  • RoPE 只用于 35 个滑动窗口层,14 个全注意力层不使用;每层都有按头学习的注意力 sink。
  • 32 个查询头、4 个键/值头,头维度 128,Q 与 K 按头做 RMSNorm。
  • 256 个路由专家,每个 token 选 6 个,宽度 512;另有始终激活的共享 SwiGLU 专家,宽度 1024。
  • 路由:sigmoid 打分,选前 6 个,所选权重重新归一化为和为 1。
  • 词表 150 144 个 token;配置的上下文长度为 262 144。

精度

一个独立实现的 PyTorch f32 前向计算(依据上游 SGLang 模型代码编写),在 819 个 token 的代码审查提示词之后, 对 32 个答案位置(强制给定答案)打分:一次使用文件自身解码后的权重(cortiq dequant),一次使用原始 bf16 权重。

文件 后端 top-1,同一权重 平均 KL,同一权重 top-1,bf16 权重 平均 KL,bf16 权重
q2tp CUDA 32/32 0.005 22/32 0.55
q2tp Vulkan 32/32 0.008 22/32 0.54
q4tp CUDA 30/32 0.020 21/32 0.43
q4tp Vulkan 31/32 0.019 22/32 0.44

前两列检验运行时:两个后端都复现了文件中的权重。后两列包含量化误差:在模型有把握的位置 KL 接近零, 在模型于多个续写之间权衡的位置 KL 增大。单个提示词加固定答案只是一项检查,不是质量评测。

速度

两个后端都在同一张 NVIDIA L4(24 GB,Google Colab)上用 cortiq bench FILE --core --tokens 128 --ctx N 测量:N 个 token 的提示词之后的首个 token 时间、其后 128 个 token 的稳定生成速度,以及显存峰值(nvidia-smi)。

CUDA · NVIDIA L4

测试平台:NVIDIA L4(24 GB),Google Colab,CUDA 构建下 CMF_GPU=cuda。无提示词时:q2tp 92–95 tok/s, q4tp 89–93。

两个文件在 CUDA 上

提示词,token 首个 token,秒(q2tp) 首个 token,秒(q4tp) 生成,tok/s(q2tp) 生成,tok/s(q4tp) 显存峰值,GB(q2tp) 显存峰值,GB(q4tp)
1 024 0.72 0.87 92.0 89.4 15.0 20.9
4 096 2.37 2.38 86.2 83.8 15.3 21.1
16 384 12.1 12.8 71.6 64.4 15.9 21.0
32 768 32.0 33.5 58.5 32.1 16.7 21.6
65 536 100.5 — 41.7 — 17.9 —

在 24 GB 显卡上,上下文约 10 000 个 token 以内 q4tp 的全部权重都在显卡上;超过后,部分路由专家从主机内存读取。 在这类显卡上处理长提示词请使用 q2tp。

Vulkan · NVIDIA L4

测试平台:同一张 L4,CMF_GPU=1(wgpu 经 Vulkan)。无提示词时:q2tp 60–70 tok/s,q4tp 50–63;同一构建在这张卡上不同运行之间相差最多 15%,表格为同一批运行。

两个文件在 Vulkan 上

提示词,token 首个 token,秒(q2tp) 首个 token,秒(q4tp) 生成,tok/s(q2tp) 生成,tok/s(q4tp) 显存峰值,GB(q2tp) 显存峰值,GB(q4tp)
1 024 1.06 1.19 60.2 53.7 15.6 21.2
4 096 4.26 4.66 55.7 51.7 15.9 21.4
8 192 9.04 9.71 50.0 47.6 16.1 21.7
16 384 20.2 — 40.6 — 16.5 —

在 Vulkan 上 q4tp 的权重占满显卡的全部权重预算:在 24 GB 显卡上,16 384 个 token 的提示词会耗尽显存,运行以错误结束。 在这类显卡上处理长提示词请使用 q2tp。

Apple silicon

本次发布未测量 Metal。

限制与许可证

输入和输出都是文本;工具调用以 Flint 的格式(<tool_call>…</tool_call>)作为文本输出,执行与权限由应用负责。 生成的代码可能错误或不安全:请运行测试并审查。262 144 个 token 的上下文是模型配置字段,不是实测保证。

权重归 Recursive 所有,采用 Apache-2.0; 本包来自 RecursiveSI/flint-v1.1 修订版本 db1fdc0fbffecf3b1df4fa2b0d44b75e5237e469。CMF 与 cortiq 采用 Apache-2.0。Flint 第一个版本:infosave/flint-cmf。

Downloads last month
-
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support

Model tree for infosave/flint-v1.1-cmf

Quantized
(37)
this model