Instructions to use SupraLabs/reasoning-summarizer-800m-pre with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use SupraLabs/reasoning-summarizer-800m-pre with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="SupraLabs/reasoning-summarizer-800m-pre") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("SupraLabs/reasoning-summarizer-800m-pre") model = AutoModelForCausalLM.from_pretrained("SupraLabs/reasoning-summarizer-800m-pre") 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 SupraLabs/reasoning-summarizer-800m-pre with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "SupraLabs/reasoning-summarizer-800m-pre" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "SupraLabs/reasoning-summarizer-800m-pre", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/SupraLabs/reasoning-summarizer-800m-pre
- SGLang
How to use SupraLabs/reasoning-summarizer-800m-pre 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 "SupraLabs/reasoning-summarizer-800m-pre" \ --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": "SupraLabs/reasoning-summarizer-800m-pre", "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 "SupraLabs/reasoning-summarizer-800m-pre" \ --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": "SupraLabs/reasoning-summarizer-800m-pre", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use SupraLabs/reasoning-summarizer-800m-pre with Docker Model Runner:
docker model run hf.co/SupraLabs/reasoning-summarizer-800m-pre
Reasoning Summarizer 0.8B
We fine-tuned this model to take a reasoning chain as plain text and output structured JSON metadata.
The goal is:
reasoning chain in -> JSON metadata out
No system prompt was used. The expected input is just the reasoning chain text, normally followed by a newline.
Output Format
{
"title": "...",
"sub_title": "...",
"summary": "...",
"cur_task": "..."
}
Breakdown
title: title of the reasoning chain/sectionsub_title: subtitle of the reasoning chain/sectionsummary: an informative but short overview of the reasoning chain/sectioncur_task: the current task the model is carrying out, generated in an extremely short (1 liner) text for agentic workflows
Example
Input:
{tool_assistant: [read_file: src/context/ThemeContext.tsx]}
{tool_result:
Theme initializes to light.
Later useEffect reads localStorage.
Second effect writes theme and updates body class.
}
Theme defaults to light before reading saved value.
That explains the white flash.
On reload, app renders light first, then switches to dark after hydration.
Need synchronous initialization.
Also body.className replaces all body classes.
Safer to use documentElement dataset.
Need to inspect main.tsx.
{tool_assistant: [read_file: src/main.tsx]}
{tool_result:
React root renders App immediately.
No theme bootstrap.
}
No pre-render theme initialization.
Need bootstrap.
Inspect settings page.
{tool_assistant: [read_file: src/pages/Settings.tsx]}
{tool_result:
Two buttons.
Current theme text.
Minimal layout.
}
Settings works but UX is extremely basic.
Need active state.
Need accessibility.
Need to inspect DashboardCard.
{tool_assistant: [read_file: src/components/DashboardCard.tsx]}
{tool_result:
Card uses hardcoded "card" class.
}
Inspect global styles.
{tool_assistant: [read_file: src/styles/global.css]}
{tool_result:
body.light
body.dark
.card {
background: white;
}
}
There it is.
Cards are permanently white.
Dark mode only changes body.
Cards never receive dark styling.
Need CSS variables instead.
Output:
{"title":"Theme Initialization Analysis",
"sub_title":"Investigating theme behavior, hydration, and accessibility issues in the React app.",
"summary":"I reviewed the theme initialization logic, noting that the app defaults to light and only switches to dark on reload. I examined the main rendering flow, identified missing pre-initialization, and found the body class replacement causing inconsistent styling. I also checked the settings page and dashboard card to understand the current implementation and identified the need for CSS variables and accessibility improvements.",
"cur_task":"I'm inspecting the React code to understand the theme initialization and styling behavior, focusing on hydration, class replacement, and accessibility."}
Included Files
This repo includes the merged model for inference and the LoRA adapters for people who want to continue SFT, RL, or other experiments.
model.safetensors
config.json
generation_config.json
tokenizer.json
tokenizer_config.json
chat_template.jinja
training_metadata.json
adapters/final_adapter/adapter_model.safetensors
adapters/final_adapter/adapter_config.json
adapters/best_adapter/adapter_model.safetensors
adapters/best_adapter/adapter_config.json
training/training_args.json
training/trainer_state.json
Training Details
- Base model:
Qwen/Qwen3.5-0.8B-Base - Method: LoRA SFT
- LoRA rank:
32 - LoRA alpha:
64 - Context length:
4096 - Loss masking: trained only on the assistant JSON output
- Prompt format: raw reasoning chain text
- System prompt: none
- Final eval loss:
0.7920386046171188
Inference
import json
import torch
from transformers import AutoModelForCausalLM, AutoTokenizer
model_id = "YOUR_USERNAME/YOUR_REPO"
tokenizer = AutoTokenizer.from_pretrained(model_id, trust_remote_code=True)
model = AutoModelForCausalLM.from_pretrained(
model_id,
torch_dtype=torch.float16,
device_map="auto",
trust_remote_code=True,
)
reasoning = "The user asks why their API returns 401. I should check auth headers and token expiry."
inputs = tokenizer(reasoning + "\n", return_tensors="pt").to(model.device)
with torch.no_grad():
output = model.generate(
**inputs,
max_new_tokens=160,
do_sample=False,
pad_token_id=tokenizer.eos_token_id,
eos_token_id=tokenizer.eos_token_id,
)
text = tokenizer.decode(output[0][inputs["input_ids"].shape[1]:], skip_special_tokens=True)
print(json.loads(text))
Continuing SFT Or RL
Use the merged checkpoint as the base model if you want to train directly from the fine-tuned model.
Use adapters/final_adapter if you want to continue from the final LoRA adapter. Use adapters/best_adapter if you want to continue from the best validation checkpoint.
For RL, useful reward checks are:
- valid JSON
- exactly these keys:
title,sub_title,summary,cur_task - no text outside the JSON object
- concise title
- faithful summary of the reasoning chain
Notes
This is a small specialized model. It is meant for reasoning-chain metadata extraction, not general chat.
The base model license and usage terms from Qwen/Qwen3.5-0.8B-Base still apply.
- Downloads last month
- -
Model tree for SupraLabs/reasoning-summarizer-800m-pre
Base model
Qwen/Qwen3.5-0.8B-Base