Looper Documentation
Looper Cookbook

Available models

This page lists the models you can train and sample with Looper, and the limits of each. No SDK call lists the models, so this page is the list.

You refer to a model by its Hugging Face name, such as Qwen/Qwen3.5-9B:

This page covers:

Training models

Every model can be trained in two ways: LoRA, which trains a small set of extra weights on top of the model, or full parameters, which trains every weight. LoRA or full parameters explains the difference.

The table shows each model's limits. A row is one training example (one Datum), counted in tokens, so "longest row" is the longest example you can train on. The LoRA rank sets how big a LoRA's set of extra weights is.

Model Longest row, full parameters Longest row, LoRA Largest LoRA rank
Qwen/Qwen3.5-9B 262,144 262,144 128
Qwen/Qwen3.8-27B 131,072 262,144 32
Qwen/Qwen3.5-4B 262,144 262,144 32
Qwen/Qwen3.5-35B-A3B 131,072 262,144 32
meta-models/Muse-Glimmer-30B 131,072 131,072 32

Things to know:

Sampling sizes

A sampler has two limits. One is the longest sequence it can handle, meaning a prompt plus its answer, in tokens, which can be up to the model's longest row above. The other is how many sequences it can write at once. That depends on the model, on how long the sequences are, and on whether the sampler runs a LoRA or full weights. A base model counts as full weights. The most a sampler can write at once:

Model LoRA, to 65,536 tokens LoRA, longer Full, to 65,536 tokens Full, longer
Qwen/Qwen3.5-9B 384 192 1,152 384
Qwen/Qwen3.8-27B 384 192 768 384
Qwen/Qwen3.5-4B 768 192 768 384
Qwen/Qwen3.5-35B-A3B 384 192 1,152 384
meta-models/Muse-Glimmer-30B 768 384 768 384

You don't pick a size directly. You set max_seq_len and max_concurrent_sequences in your SamplerConfig, and Looper picks the fewest GPUs that fit both.

Things to know:

LoRA or full parameters

TrainingConfig.kind picks how the run trains:

Lora(rank=...) Full()
What trains Low-rank factors over the frozen base Every parameter
save_weights writes The adapter, in PEFT's layout The whole model, as Hugging Face safetensors
save_state writes The factors with their optimizer state The whole model with its optimizer state

Lora settings:

A LoRA run looks like this:

from looper_sdk import Lora, TrainingConfig

config = TrainingConfig(
    model="Qwen/Qwen3.5-9B",
    kind=Lora(rank=32),
    tokens_per_step=65536,
    max_seq_len=4096,
)

To train every parameter instead, pass kind=Full(), with a model that has a full-parameters limit in Training models. With either kind, tokens_per_step must be at least max_seq_len, so that each step can hold at least your longest row.

Optimizers

The optimizer is what changes the weights in each training step. Runs on Looper train with AdamW. The SDK also has Muon, but no model on Looper offers it yet, so a run that asks for it raises CreationError with an InvalidArgument cause.

You can let Looper choose the optimizer's settings, or set them yourself:

Either way, you can change the learning rate for a single step with optim_step(learning_rate=...). That's how you run a schedule, such as a rate that decays over training. Set the learning rate shows how.

Tokenizers and chat templates

Looper takes tokens, not text, so your program turns text into tokens itself, on your machine. Use the model's own tokenizer, loaded by the same Hugging Face name:

from transformers import AutoTokenizer

tokenizer = AutoTokenizer.from_pretrained("Qwen/Qwen3.5-9B")

Two models need extra care with their chat format:

Muse Glimmer ends each chat turn with <|eot|>, not with its tokenizer's default end-of-sequence (EOS) token, <|end_of_text|>. So set <|eot|> as the EOS token, and tell the sampler to stop on it:

from looper_sdk import SamplingParams

tokenizer = AutoTokenizer.from_pretrained("meta-models/Muse-Glimmer-30B")
tokenizer.eos_token = "<|eot|>"
params = SamplingParams(max_tokens=512, stop_token_ids=[tokenizer.eos_token_id])

The cookbook's message formatter for Muse Glimmer ends each turn's targets with <|eot|> and stops on it.

Qwen chat templates have a thinking switch, enable_thinking, which turns the model's reasoning before its answer on or off. Use the same setting when you train and when you sample. The Chat data tutorial shows the switch, and Message formatting lists each model's settings.