CarperAI/openai_summarize_tldr
Viewer • Updated • 130k • 5.72k • 32
How to use Maximus200005/qwen35-0.8b-tldr-sft-ep1 with Transformers:
# Use a pipeline as a high-level helper
from transformers import pipeline
pipe = pipeline("text-generation", model="Maximus200005/qwen35-0.8b-tldr-sft-ep1")
messages = [
{"role": "user", "content": "Who are you?"},
]
pipe(messages) # Load model directly
from transformers import AutoTokenizer, AutoModelForCausalLM
tokenizer = AutoTokenizer.from_pretrained("Maximus200005/qwen35-0.8b-tldr-sft-ep1")
model = AutoModelForCausalLM.from_pretrained("Maximus200005/qwen35-0.8b-tldr-sft-ep1", 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]:]))How to use Maximus200005/qwen35-0.8b-tldr-sft-ep1 with vLLM:
# Install vLLM from pip:
pip install vllm
# Start the vLLM server:
vllm serve "Maximus200005/qwen35-0.8b-tldr-sft-ep1"
# Call the server using curl (OpenAI-compatible API):
curl -X POST "http://localhost:8000/v1/chat/completions" \
-H "Content-Type: application/json" \
--data '{
"model": "Maximus200005/qwen35-0.8b-tldr-sft-ep1",
"messages": [
{
"role": "user",
"content": "What is the capital of France?"
}
]
}'docker model run hf.co/Maximus200005/qwen35-0.8b-tldr-sft-ep1
How to use Maximus200005/qwen35-0.8b-tldr-sft-ep1 with SGLang:
# Install SGLang from pip:
pip install sglang
# Start the SGLang server:
python3 -m sglang.launch_server \
--model-path "Maximus200005/qwen35-0.8b-tldr-sft-ep1" \
--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": "Maximus200005/qwen35-0.8b-tldr-sft-ep1",
"messages": [
{
"role": "user",
"content": "What is the capital of France?"
}
]
}'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 "Maximus200005/qwen35-0.8b-tldr-sft-ep1" \
--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": "Maximus200005/qwen35-0.8b-tldr-sft-ep1",
"messages": [
{
"role": "user",
"content": "What is the capital of France?"
}
]
}'How to use Maximus200005/qwen35-0.8b-tldr-sft-ep1 with Docker Model Runner:
docker model run hf.co/Maximus200005/qwen35-0.8b-tldr-sft-ep1
Supervised fine-tuned Qwen/Qwen3.5-0.8B for TL;DR summarization of Reddit posts from CarperAI/openai_summarize_tldr.
This checkpoint is intended as a warm-start policy for Active Preference Learning (AL) + DPO experiments.
| Item | Value |
|---|---|
| Base model | Qwen/Qwen3.5-0.8B |
| Task | Reddit post → short TL;DR-style summary |
| Training type | Causal LM SFT (completion-only cross-entropy) |
| Selected checkpoint | End of epoch 1 (global step 1292) |
Validation eval_loss (epoch 1) |
~1.868 |
CarperAI/openai_summarize_tldr (train / valid)AL_Uncertainty/src/data_utils.py):rstrip)r/offmychest or r/tifulabel (reference TL;DR) as the assistant turn in a chat template.After filtering, the training split size is ~20.6k examples.
Training was run with Hugging Face TRL
Key hyperparameters (sft/config/default.yaml):
| Hyperparameter | Value |
|---|---|
| Epochs (planned) | 3 |
| Checkpoint released | Epoch 1 only |
| Per-device train batch size | 2 |
| Gradient accumulation | 8 → effective batch 16 |
| Learning rate | 2e-5 |
| Warmup ratio | 0.05 |
| Max sequence length | 2048 |
| Precision | bf16 |
from transformers import AutoModelForCausalLM, AutoTokenizer
import torch
model_id = "Maximus200005/qwen35-0.8b-tldr-sft-ep1"
tokenizer = AutoTokenizer.from_pretrained(model_id, trust_remote_code=True)
model = AutoModelForCausalLM.from_pretrained(
model_id,
trust_remote_code=True,
torch_dtype=torch.bfloat16,
device_map="auto",
use_safetensors=True,
)