/ Модель

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

Лицензия
MIT
Опубликована
16 ноя 2026

nat-tokenizer-h32-l4-c6400

Языковая модельИзображение, текст → action3 профессии
145скачиваний за 30 дней0лайковвеса обновлены24 ноя 2026

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

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

NAT — токенизатор, который сжимает фрагменты действий робота в дискретные токены и декодирует их обратно для использования в потоковых VLA-моделях.

NAT action tokenizer — токенизатор действий робота, разработанный Ahad Jawaid в рамках работы NAT: Scaling Causal Neural Action Tokenizers Across Embodiments. Он преобразует фрагменты траекторий действий в дискретные токены для vision-language-action моделей и восстанавливает действия из токенов. Репозиторий содержит веса и конфигурацию; нейросетевая реализация предоставляется пакетом nat-tokenizer.

Модель обрабатывает фрагменты длиной ровно 32 шага и до 7 столбцов действий в одной группе. Каждый фрагмент кодируется в 14 токенов: используются 4 латентных представления и 4 масштаба FSQ с 6 400 кодами. Причинное упорядочивание токенов позволяет декодировать префикс и получать ранние шаги траектории до завершения генерации всего фрагмента. Для большего числа столбцов действия обрабатываются отдельными группами по 7.

Токенизатор рассчитан на интеграцию в робототехнические VLA-сценарии, включая потоковое выполнение и бесшовное продолжение между фрагментами. README приводит результаты восстановления на LIBERO-10, MetaWorld и RoboMimic, а также замеры скорости на CPU и RTX 4090. Нормализация по столбцам включена по умолчанию; значения вне заданного диапазона обрезаются. Лицензия — MIT.

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

  • кодирование траекторий действий робота в токены для VLA-модели
  • декодирование сгенерированных токенов в последовательность действий робота
  • потоковая генерация и исполнение действий по мере декодирования
  • подготовка действий для обучения робототехнических моделей
  • бесшовное продолжение траектории между соседними фрагментами

Ограничения

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

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

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

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

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

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

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

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

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

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

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

Открыть на Hugging Face

NAT action tokenizer

Turns robot action chunks into discrete tokens for a vision-language-action model, and tokens back into actions. Every 32-step chunk of up to 7 action columns becomes 14 tokens, in time order, so a model can stream actions before it has generated the whole chunk.

Paper: NAT: Scaling Causal Neural Action Tokenizers Across Embodiments. Code: github.com/ahadjawaid/nat.

Quick start

pip install nat-tokenizer
import numpy as np
from nat_tokenizer import NATActionTokenizer

tokenizer = NATActionTokenizer.from_pretrained()   # downloads ahad-j/nat-tokenizer-h32-l4-c6400

# 1. Fit the normalization once, on your dataset's actions (any shape ending in action_dim).
tokenizer.fit(dataset_actions)

# 2. Tokenize 32-step chunks: (batch, 32, action_dim) or one chunk (32, action_dim).
tokens = tokenizer(action_chunks)            # list (one per chunk) of lists of ints in [0, 25600)

# 3. Decode back to actions in your original units.
actions = tokenizer.decode(tokens, action_dim=action_chunks.shape[-1])   # (batch, 32, action_dim)

# 4. Save the fitted tokenizer (keeps your min and max) and load it later the same way.
tokenizer.save_pretrained("my-nat-tokenizer")
tokenizer = NATActionTokenizer.from_pretrained("my-nat-tokenizer")

Normalization (on by default)

The tokenizer was trained on actions in [-1, 1]. With normalize=True (the default) every column is mapped from its min and max to [-1, 1] before encoding (values outside are clipped) and decoded actions are mapped back, so you work in your own units throughout. Set the min and max with fit(dataset_actions), or pass them directly:

tokenizer = NATActionTokenizer.from_pretrained(action_min=[...], action_max=[...])

If your actions are already in [-1, 1], pass normalize=False to both calls: tokenizer(chunks, normalize=False) and tokenizer.decode(tokens, action_dim=d, normalize=False). A column whose min equals its max is encoded as 0 and decoded back to its constant value.

Streaming (causal decoding)

Within a group the 14 tokens are time ordered: the first 4 decode the chunk's first 8 steps, the first 7 its first 16, the first 11 its first 24, and all 14 the whole chunk. A prefix decodes exactly the same first steps as the full chunk, so a model can execute actions while it is still generating. stream() decodes one chunk token by token and returns each latent's 8 actions as soon as its tokens are complete:

stream = tokenizer.stream(action_dim=7)
for token in generated_tokens:                # one at a time, as your model generates them
    actions = stream.push(token)              # (8, 7) when a latent completes, else (0, 7)
    if len(actions):
        robot.execute(actions)

For real-time chunking, the next chunk can be generated while the robot executes the last actions of the current one, so that it starts with them. tokens_starting_with turns those actions into the first tokens of the next chunk; the model generates only the tokens after them, and the robot switches to the new chunk without a jump:

prefix = tokenizer.tokens_starting_with(executing_actions)   # (batch, steps, d), steps ending a latent (8, 16 or 24)
# continue the model's generation after `prefix`, then decode the whole token list

A prefix of whole latents also decodes directly:

for steps in (8, 16, 24, 32):
    prefix = [chunk[:tokenizer.prefix_token_count(steps)] for chunk in tokens]
    first_steps = tokenizer.decode(prefix, action_dim=7)      # (batch, steps, 7)

Streaming works for actions of up to 7 columns (one group).

Action dimensions

Columns are split into consecutive groups of up to 7 (8 columns = 7 + 1, 14 = 7 + 7, 21 = 7 + 7 + 7). Each group gets its own 14 tokens and a chunk's tokens are the groups' tokens one after another: tokenizer.tokens_per_chunk(action_dim) gives the count (14 per group). Chunks must be exactly 32 steps long.

GPU and CUDA graphs

tokenizer = tokenizer.to("cuda")                      # eager on the GPU
tokenizer = tokenizer.to("cuda", cuda_graphs=True)    # captures the encoder and decoder once per batch shape

Inputs and outputs stay NumPy. GPU results match the CPU up to floating point (rarely a token on a quantization boundary differs).

API

calldoes
NATActionTokenizer.from_pretrained(repo_or_folder, action_min=None, action_max=None)load (optionally with your min and max)
tokenizer.fit(actions)per-column min and max of your actions (returns the tokenizer)
tokenizer(chunks, normalize=True)(batch, 32, d) or (32, d) actions to a list of token lists
tokenizer.decode(tokens, action_dim, normalize=True)token lists (whole chunks, or one group's prefix) to (batch, steps, d) actions
tokenizer.stream(action_dim, normalize=True)a decoder whose push(token) returns each latent's actions as soon as its tokens are generated
tokenizer.tokens_starting_with(actions, normalize=True)the first tokens of a chunk that starts with these actions (real-time chunking)
tokenizer.prefix_token_count(steps)tokens that decode the first steps (8, 16, 24 or 32)
tokenizer.tokens_per_chunk(action_dim)14 per group of 7 columns
tokenizer.to(device, cuda_graphs=False)run on a device, optionally with CUDA graphs
tokenizer.save_pretrained(directory)save, with the fitted min and max
tokenizer.vocab_size25,600 (4 scales x 6,400 codes)

Model

4 latents per chunk, 4 FSQ scales of 6,400 codes (one coarse token per two latents, three finer tokens per latent), trained on a large corpus of robot and human action data (every window once, batch 4,096). The repository holds only the weights (model.safetensors) and a JSON config; the network is plain PyTorch in the nat-tokenizer package.

Reconstruction on robot benchmarks, and speed

Random 32-step chunks of each benchmark's demonstrations, each normalized by its own min and max (MetaWorld's actions clipped to the [-1, 1] its simulator executes). Errors are mean absolute differences between the input and its reconstruction. Speed is in milliseconds per call on an RTX 4090 and 4 CPU threads, mean and SD over 20 calls.

benchmarkchunks x shapeMAE in [-1, 1] unitsMAEmax error
LIBERO-101000 x (32, 7)0.03040.02101.9762
MetaWorld mt4 (clipped)1000 x (32, 4)0.06510.06511.7578
RoboMimic mt41000 x (32, 7)0.04660.04041.5712
RoboCasa mt41000 x (32, 12)0.01300.01070.9970
devicebatch of 32 x 7 chunksencode msdecode ms
cpu, eager111.11 ± 0.0523.12 ± 0.28
cpu, eager64320.02 ± 0.90249.54 ± 0.68
cuda, eager14.21 ± 0.048.02 ± 0.57
cuda, eager644.54 ± 0.118.46 ± 0.55
cuda, CUDA graphs10.50 ± 0.012.14 ± 0.02
cuda, CUDA graphs640.82 ± 0.013.55 ± 0.03

Citation

@misc{jawaid2026nat,
  title={NAT: Scaling Causal Neural Action Tokenizers Across Embodiments},
  author={Ahad Jawaid and Alexander Swerdlow and Yu Xiang},
  year={2026},
  eprint={2611.28873},
  archivePrefix={arXiv},
  primaryClass={cs.RO},
  url={https://arxiv.org/abs/2611.28873}
}

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

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

GPU в ailist

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

Нельзя запустить

Модели для роботов не запускаются как сервис инференса.

Ревизия весов
4336d9f

0 моделей