Instructions to use mtybilly/Qwen3.5-0.8B-Rollback with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use mtybilly/Qwen3.5-0.8B-Rollback with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="mtybilly/Qwen3.5-0.8B-Rollback") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("mtybilly/Qwen3.5-0.8B-Rollback") model = AutoModelForCausalLM.from_pretrained("mtybilly/Qwen3.5-0.8B-Rollback", device_map="auto") messages = [ {"role": "user", "content": "Who are you?"}, ] inputs = tokenizer.apply_chat_template( messages, add_generation_prompt=True, tokenize=True, return_dict=True, return_tensors="pt", ).to(model.device) outputs = model.generate(**inputs, max_new_tokens=40) print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use mtybilly/Qwen3.5-0.8B-Rollback with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "mtybilly/Qwen3.5-0.8B-Rollback" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "mtybilly/Qwen3.5-0.8B-Rollback", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/mtybilly/Qwen3.5-0.8B-Rollback
- SGLang
How to use mtybilly/Qwen3.5-0.8B-Rollback with SGLang:
Install from pip and serve model
# Install SGLang from pip: pip install sglang # Start the SGLang server: python3 -m sglang.launch_server \ --model-path "mtybilly/Qwen3.5-0.8B-Rollback" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "mtybilly/Qwen3.5-0.8B-Rollback", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker images
docker run --gpus all \ --shm-size 32g \ -p 30000:30000 \ -v ~/.cache/huggingface:/root/.cache/huggingface \ --env "HF_TOKEN=<secret>" \ --ipc=host \ lmsysorg/sglang:latest \ python3 -m sglang.launch_server \ --model-path "mtybilly/Qwen3.5-0.8B-Rollback" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "mtybilly/Qwen3.5-0.8B-Rollback", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use mtybilly/Qwen3.5-0.8B-Rollback with Docker Model Runner:
docker model run hf.co/mtybilly/Qwen3.5-0.8B-Rollback
Qwen3.5-0.8B-Rollback
Qwen3.5-0.8B-Base trained to emit <UNDO>N</UNDO>, a stack-semantic command that
deletes the last N visible tokens so the model can retract a continuation it has
already produced and rewrite it. <UNDO> and </UNDO> are atomic tokens
(ids 248077 / 248078) occupying spare rows of the Qwen3.5 vocabulary, so the
embedding matrix is not resized.
Training
One merged stage over a 300M-token mixture, full fine-tune, 1016 steps, 1 epoch,
lr 2e-5, 4x A40. Labels differ per source: raw_replay (48%, FineWeb-Edu) is
fully supervised in the CPT sense, while the remaining 52% is prompt-masked SFT
(tulu 13%, on-policy undo 11% and clean 14%, long-context undo 9% and clean 5%).
The rollback rows come from mtybilly/RollbackTraj v2,
where N is derived at build time from the tokens actually emitted, cut at sentence
boundaries, giving realized N a p50 of 162 and a p99 of 1898.
Guardrail evaluation
Absolute change against Qwen3.5-0.8B-Base. The pre-registered threshold was a drop of at most 2.0 points per task.
| task | base | this model | delta |
|---|---|---|---|
| MMLU | 0.5285 | 0.5126 | -1.59 |
| HellaSwag acc_norm | 0.5489 | 0.5427 | -0.62 |
| IFEval inst strict (chat) | 0.4760 | 0.4664 | -0.96 |
| GSM8K flexible (chat) | 0.4837 | 0.4488 | -3.49 |
| GSM8K flexible (plain) | 0.1403 | 0.2942 | +15.39 |
| IFEval inst strict (plain) | 0.3969 | 0.3405 | -5.64 |
Two tasks exceed the threshold. The pattern is a shift rather than a loss: the model moves toward the plain-continuation regime its rollback data is written in, gaining sharply on plain-format GSM8K while giving up ground in the chat regime.
Rollback behaviour, and the main caveat
| probe | chat prompt | plain prompt |
|---|---|---|
| three-arm trigger rate | 0.0% | 10.5% |
| injected-error trigger rate | 0.0% | 6.0% |
The command fires only under plain continuation prompts, matching the format it
was trained in; under a chat template it never fires. The 0% is not a measurement
artifact -- the probes decode with skip_special_tokens=False and detect the
command by token id, and the marker rows drifted 0.425 and 0.493 from base against
0.009 for an ordinary row.
In the injected-error probe the trigger rate was identical (6.0%) whether the planted prefix was wrong or correct, p = 1.0. On that evidence the trigger is not yet demonstrably content-driven, though each condition had only 12 triggering items, too few to resolve a modest effect. Treat rollback timing as unvalidated.
Use
from transformers import AutoTokenizer, AutoModelForCausalLM
tok = AutoTokenizer.from_pretrained("mtybilly/Qwen3.5-0.8B-Rollback")
model = AutoModelForCausalLM.from_pretrained("mtybilly/Qwen3.5-0.8B-Rollback")
Prompt as plain continuation text, not with a chat template. Generated text must
be passed through a stack interpreter that applies each <UNDO>N</UNDO> before
the output is read; the raw decode still contains the retracted spans.
- Downloads last month
- 6
Model tree for mtybilly/Qwen3.5-0.8B-Rollback
Base model
Qwen/Qwen3.5-0.8B-Base