Views
No views yet
1from transformers import AutoModelForCausalLM, AutoTokenizer
2
3model = AutoModelForCausalLM.from_pretrained("verque-app/qwen3-8b-karma-v2")
4tokenizer = AutoTokenizer.from_pretrained("verque-app/qwen3-8b-karma-v2")
5
6# Format prompt for karma-targeted generation
7prompt = """<|im_start|>user
8Subreddit: r/AskReddit
9Title: What's something that sounds fake but is actually true?
10Post Score: 15420
11Task: write a Reddit reply targeting this karma score
12Target Score: high<|im_end|>
13<|im_start|>assistant
14<think>
15
16</think>
17
18"""
19
20inputs = tokenizer(prompt, return_tensors="pt")
21outputs = model.generate(**inputs, max_new_tokens=256, temperature=0.7)
22print(tokenizer.decode(outputs[0], skip_special_tokens=False))low: 1-10 karmamedium: 10-100 karmahigh: 100-1000 karmatop: 1000+ karma1curl -X POST http://localhost:8000/v1/completions \
2 -H "Content-Type: application/json" \
3 -d '{
4 "prompt": "<|im_start|>user\nSubreddit: r/technology\nTitle: Apple announces new M4 chip\nBody: The new M4 chip promises 50% better performance than M3.\nPost Score: 500\nTask: write a Reddit reply targeting this karma score\nTarget Score: 5.0<|im_end|>\n<|im_start|>assistant\n<think>\n\n</think>\n\n",
5 "temperature": 0.7,
6 "max_tokens": 1024,
7 "stop": ["<|im_end|>"]
8 }'1curl -X POST http://localhost:8000/v1/completions \
2 -H "Content-Type: application/json" \
3 -d '{
4 "prompt": "<|im_start|>user\nSubreddit: r/technology\nTitle: Apple announces new M4 chip\nBody: The new M4 chip promises 50% better performance than M3.\nPost Score: 500\nParent 1: 50% sounds impressive but what'\''s the real-world difference?\nParent 1 Score: 200\nTask: write a Reddit reply targeting this karma score\nTarget Score: 4.6<|im_end|>\n<|im_start|>assistant\n<think>\n\n</think>\n\n",
5 "temperature": 0.7,
6 "max_tokens": 1024,
7 "stop": ["<|im_end|>"]
8 }'1curl -X POST http://localhost:8000/v1/completions \
2 -H "Content-Type: application/json" \
3 -d '{
4 "prompt": "<|im_start|>user\nSubreddit: r/technology\nTitle: Apple announces new M4 chip\nBody: The new M4 chip promises 50% better performance than M3.\nPost Score: 500\nTask: predict the karma score for this reply\nReply: Sounds cool but I'\''ll wait for independent benchmarks before getting excited.<|im_end|>\n<|im_start|>assistant\n<think>\n\n</think>\n\n",
5 "temperature": 0.3,
6 "max_tokens": 64,
7 "stop": ["<|im_end|>"]
8 }'Note: v2 does not support persona steering. For persona-controlled generation, use qwen3-8b-karma-v3.
| Feature | v2 | v3 |
|---|---|---|
| Subreddits | ~10 | 33 |
| Persona steering | No | Yes |
| DPO variant | Standard | Authentic (stricter filtering) |
| Adaptive thresholds | No | Yes |
1@misc{qwen3-karma-v2,
2 title={Qwen3-8B Karma v2: Reddit Comment Generation with DPO},
3 author={Verque},
4 year={2026},
5 publisher={HuggingFace},
6 url={https://huggingface.co/verque-app/qwen3-8b-karma-v2}
7}