Text Generation
Transformers
Safetensors
English
qwen2
text-generation-inference
unsloth
trl
grpo
conversational
Instructions to use MasterControlAIML/DeepSeek-R1-Qwen2.5-3b-LLM-Judge-Reward-JSON-Unstructured-To-Structured-Lora with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use MasterControlAIML/DeepSeek-R1-Qwen2.5-3b-LLM-Judge-Reward-JSON-Unstructured-To-Structured-Lora with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="MasterControlAIML/DeepSeek-R1-Qwen2.5-3b-LLM-Judge-Reward-JSON-Unstructured-To-Structured-Lora") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("MasterControlAIML/DeepSeek-R1-Qwen2.5-3b-LLM-Judge-Reward-JSON-Unstructured-To-Structured-Lora") model = AutoModelForCausalLM.from_pretrained("MasterControlAIML/DeepSeek-R1-Qwen2.5-3b-LLM-Judge-Reward-JSON-Unstructured-To-Structured-Lora") 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 MasterControlAIML/DeepSeek-R1-Qwen2.5-3b-LLM-Judge-Reward-JSON-Unstructured-To-Structured-Lora with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "MasterControlAIML/DeepSeek-R1-Qwen2.5-3b-LLM-Judge-Reward-JSON-Unstructured-To-Structured-Lora" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "MasterControlAIML/DeepSeek-R1-Qwen2.5-3b-LLM-Judge-Reward-JSON-Unstructured-To-Structured-Lora", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/MasterControlAIML/DeepSeek-R1-Qwen2.5-3b-LLM-Judge-Reward-JSON-Unstructured-To-Structured-Lora
- SGLang
How to use MasterControlAIML/DeepSeek-R1-Qwen2.5-3b-LLM-Judge-Reward-JSON-Unstructured-To-Structured-Lora 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 "MasterControlAIML/DeepSeek-R1-Qwen2.5-3b-LLM-Judge-Reward-JSON-Unstructured-To-Structured-Lora" \ --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": "MasterControlAIML/DeepSeek-R1-Qwen2.5-3b-LLM-Judge-Reward-JSON-Unstructured-To-Structured-Lora", "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 "MasterControlAIML/DeepSeek-R1-Qwen2.5-3b-LLM-Judge-Reward-JSON-Unstructured-To-Structured-Lora" \ --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": "MasterControlAIML/DeepSeek-R1-Qwen2.5-3b-LLM-Judge-Reward-JSON-Unstructured-To-Structured-Lora", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Unsloth Studio
How to use MasterControlAIML/DeepSeek-R1-Qwen2.5-3b-LLM-Judge-Reward-JSON-Unstructured-To-Structured-Lora with Unsloth Studio:
Install Unsloth Studio (macOS, Linux, WSL)
curl -fsSL https://unsloth.ai/install.sh | sh # Run unsloth studio unsloth studio -H 0.0.0.0 -p 8888 # Then open http://localhost:8888 in your browser # Search for MasterControlAIML/DeepSeek-R1-Qwen2.5-3b-LLM-Judge-Reward-JSON-Unstructured-To-Structured-Lora to start chatting
Install Unsloth Studio (Windows)
irm https://unsloth.ai/install.ps1 | iex # Run unsloth studio unsloth studio -H 0.0.0.0 -p 8888 # Then open http://localhost:8888 in your browser # Search for MasterControlAIML/DeepSeek-R1-Qwen2.5-3b-LLM-Judge-Reward-JSON-Unstructured-To-Structured-Lora to start chatting
Using HuggingFace Spaces for Unsloth
# No setup required # Open https://huggingface.co/spaces/unsloth/studio in your browser # Search for MasterControlAIML/DeepSeek-R1-Qwen2.5-3b-LLM-Judge-Reward-JSON-Unstructured-To-Structured-Lora to start chatting
Load model with FastModel
pip install unsloth from unsloth import FastModel model, tokenizer = FastModel.from_pretrained( model_name="MasterControlAIML/DeepSeek-R1-Qwen2.5-3b-LLM-Judge-Reward-JSON-Unstructured-To-Structured-Lora", max_seq_length=2048, ) - Docker Model Runner
How to use MasterControlAIML/DeepSeek-R1-Qwen2.5-3b-LLM-Judge-Reward-JSON-Unstructured-To-Structured-Lora with Docker Model Runner:
docker model run hf.co/MasterControlAIML/DeepSeek-R1-Qwen2.5-3b-LLM-Judge-Reward-JSON-Unstructured-To-Structured-Lora
Update README.md
Browse files
README.md
CHANGED
|
@@ -1,23 +1,84 @@
|
|
| 1 |
---
|
| 2 |
-
|
|
|
|
| 3 |
tags:
|
| 4 |
- text-generation-inference
|
| 5 |
- transformers
|
| 6 |
- unsloth
|
| 7 |
- qwen2
|
| 8 |
- trl
|
| 9 |
-
- grpo
|
| 10 |
license: apache-2.0
|
| 11 |
language:
|
| 12 |
- en
|
| 13 |
---
|
| 14 |
|
| 15 |
-
# Uploaded
|
| 16 |
|
| 17 |
-
|
| 18 |
-
-
|
| 19 |
-
|
| 20 |
-
|
| 21 |
-
|
|
|
|
| 22 |
|
| 23 |
[<img src="https://raw.githubusercontent.com/unslothai/unsloth/main/images/unsloth%20made%20with%20love.png" width="200"/>](https://github.com/unslothai/unsloth)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
---
|
| 2 |
+
# 🦄 Model Card
|
| 3 |
+
base_model: unsloth/Qwen2.5-3B-Instruct
|
| 4 |
tags:
|
| 5 |
- text-generation-inference
|
| 6 |
- transformers
|
| 7 |
- unsloth
|
| 8 |
- qwen2
|
| 9 |
- trl
|
| 10 |
+
- grpo # Gradient Reward Policy Optimization
|
| 11 |
license: apache-2.0
|
| 12 |
language:
|
| 13 |
- en
|
| 14 |
---
|
| 15 |
|
| 16 |
+
# 📦 Uploaded Model
|
| 17 |
|
| 18 |
+
| **Field** | **Value** |
|
| 19 |
+
|-----------------------|--------------------------------------------|
|
| 20 |
+
| **Developed by** | **bhaviktheslider** |
|
| 21 |
+
| **License** | Apache 2.0 |
|
| 22 |
+
| **Finetuned from** | `unsloth/Qwen2.5-3B-Instruct` |
|
| 23 |
+
| **Training Framework**| [Unsloth](https://github.com/unslothai/unsloth) × Hugging Face TRL |
|
| 24 |
|
| 25 |
[<img src="https://raw.githubusercontent.com/unslothai/unsloth/main/images/unsloth%20made%20with%20love.png" width="200"/>](https://github.com/unslothai/unsloth)
|
| 26 |
+
|
| 27 |
+
---
|
| 28 |
+
|
| 29 |
+
## 🚀 What’s New?
|
| 30 |
+
|
| 31 |
+
> **TL;DR** – Think of this model as the beefed-up, protein-shake-powered sequel to **MasterControlAIML/DeepSeek-R1-Qwen2.5-1.5b-SFT-R1-JSON-Unstructured-To-Structured** … except we ditched the SFT and let a squad of reward functions do the coaching.
|
| 32 |
+
|
| 33 |
+
### Key Upgrades
|
| 34 |
+
1. **Larger Backbone** – We jumped from a 1.5 B parameter model to a 3 B parameter **Qwen 2.5** variant for more representational oomph.
|
| 35 |
+
2. **No SFT, All 🍬 Rewards** – Instead of supervised fine-tuning, training relied solely on reward-based optimization (GRPO).
|
| 36 |
+
- **LM-as-Judge**: A language model scored candidate outputs for task quality.
|
| 37 |
+
- **Auxiliary Rewards**: Style, length, and JSON-validity rewards kept the model on its best behavior.
|
| 38 |
+
3. **2× Faster Training** – Courtesy of Unsloth’s memory-efficient tricks (flash attention + fused optimizers).
|
| 39 |
+
|
| 40 |
+
---
|
| 41 |
+
|
| 42 |
+
## 🛠️ Intended Use
|
| 43 |
+
|
| 44 |
+
- Converts messy, free-form text into structured JSON—exactly like its 1.5 B predecessor, but with a deeper knowledge reservoir and reinforcement-tuned precision.
|
| 45 |
+
- Drop-in replacement for any pipeline already using the DeepSeek-R1 model. Just swap checkpoints and enjoy the headroom.
|
| 46 |
+
|
| 47 |
+
---
|
| 48 |
+
|
| 49 |
+
## 🏋️ Training Details
|
| 50 |
+
|
| 51 |
+
| Item | Value |
|
| 52 |
+
|------|-------|
|
| 53 |
+
| **Base Model** | `unsloth/Qwen2.5-3B-Instruct` |
|
| 54 |
+
| **Batching** | Gradient Accumulation 8, bfloat16 |
|
| 55 |
+
| **Optimizer** | AdamW (fused) |
|
| 56 |
+
| **Algorithm** | GRPO (policy ≈ LM; reward model ≈ separate LM judge) |
|
| 57 |
+
| **Epochs** | 3 (effective) |
|
| 58 |
+
| **Speed** | ~2× faster vs. vanilla PyTorch thanks to Unsloth |
|
| 59 |
+
|
| 60 |
+
---
|
| 61 |
+
|
| 62 |
+
## 📊 Evaluation (Coming Soon)
|
| 63 |
+
|
| 64 |
+
We’re benchmarking against:
|
| 65 |
+
- Exact-match JSON accuracy
|
| 66 |
+
- Structural F1
|
| 67 |
+
- Valid-JSON rate
|
| 68 |
+
|
| 69 |
+
…stay tuned—numbers arriving faster than you can say “schema validation.”
|
| 70 |
+
|
| 71 |
+
---
|
| 72 |
+
|
| 73 |
+
## 🤝 Citation
|
| 74 |
+
|
| 75 |
+
If you build something cool with this model, a shout-out would be lovely:
|
| 76 |
+
|
| 77 |
+
```bibtex
|
| 78 |
+
@misc{bhaviktheslider_2025_unsloth_qwen2.5_3b_grpo,
|
| 79 |
+
title = {An Unsloth-accelerated GRPO-trained Qwen 2.5 3B for JSON structuring},
|
| 80 |
+
author = {Bhaviktheslider},
|
| 81 |
+
year = {2025},
|
| 82 |
+
howpublished = {Hugging Face},
|
| 83 |
+
note = {https://huggingface.co/bhaviktheslider/<repo>}
|
| 84 |
+
}
|