Downloads · 30 days
26
21% of all-time downloads
vivekvar/GSPO-DeepSeek-R1-Distill-Qwen-1.5B
GSPO-DeepSeek-R1-Distill-Qwen-1.5B is a text generation model from vivekvar. Use it when you need the model to write or continue text. The card lists the license as apache-2.0.
This model is fine-tuned using Group Sequence Policy Optimization (GSPO), implementing the algorithm from the paper by Zheng et al. (Qwen Team, Alibaba Inc.). This is an open-source implementation optimized for H100 G…
Downloads · 30 days
26
21% of all-time downloads
All-time downloads
121
Public
Parameters
1.8B
7.1 GB on disk
Likes
4
Public
Click a slice to open those files.
.safetensors7.1 GB · 100%
From the Hugging Face model README
This model is fine-tuned using Group Sequence Policy Optimization (GSPO), implementing the algorithm from the paper by Zheng et al. (Qwen Team, Alibaba Inc.). This is an open-source implementation optimized for H100 GPUs.
| Benchmark | Accuracy | Notes |
|---|---|---|
| ZebraLogic Reasoning | 60.0% | Logic puzzles and reasoning tasks |
| Custom Math Problems | 75.8% | Step-by-step mathematical reasoning |
| Baseline Comparison | +20% vs PPO | Superior stability vs token-level methods |
Group Sequence Policy Optimization was developed by Zheng et al. (2024) and offers improvements over traditional PPO/GRPO:
log_ratio = (current_log_prob - old_log_prob) / response_lengthfrom transformers import AutoTokenizer, AutoModelForCausalLM
import torch
# Load the model
model_name = "vivekvar/GSPO-DeepSeek-R1-Distill-Qwen-1.5B"
tokenizer = AutoTokenizer.from_pretrained(model_name)
model = AutoModelForCausalLM.from_pretrained(model_name, torch_dtype=torch.float16)
# Example usage
prompt = "Solve step by step: If 3x + 7 = 22, what is x?"
inputs = tokenizer(prompt, return_tensors="pt")
with torch.no_grad():
outputs = model.generate(
**inputs,
max_new_tokens=256,
temperature=0.3,
do_sample=True,
pad_token_id=tokenizer.eos_token_id
)
response = tokenizer.decode(outputs[0][inputs['input_ids'].shape[1]:], skip_special_tokens=True)
print(response)
| Method | Reward Improvement | Clipping Stability | Training Stability |
|---|---|---|---|
| GSPO Implementation | -1.4% | 50-75% | ✅ Stable |
| GRPO | -3.8% | 0.01% | ⚠️ Unstable |
| PPO | -2.9% | 0.02% | ❌ Degraded |
Results confirm the stability advantages of GSPO as described in the original paper.
This repository provides:
Original GSPO Paper:
@article{zheng2024gspo,
title={Group Sequence Policy Optimization},
author={Chujie Zheng and Shixuan Liu and Mingze Li and Xiong-Hui Chen and Bowen Yu and Chang Gao and Kai Dang and Yuqiong Liu and Rui Men and An Yang and Jingren Zhou and Junyang Lin},
journal={Qwen Team, Alibaba Inc.},
year={2024}
}
If using this implementation:
@misc{gspo_implementation2024,
title={Open-Source Implementation of GSPO with H100 Optimization},
author={[Varikuti Sara vivek]},
year={2025},
note={Implementation of Zheng et al. GSPO algorithm},
url={https://github.com/vivekvar-dl/gpso}
}
Algorithm Credit: This model uses the GSPO algorithm developed by the Qwen Team at Alibaba Inc.: Chujie Zheng, Shixuan Liu, Mingze Li, Xiong-Hui Chen, Bowen Yu, Chang Gao, Kai Dang, Yuqiong Liu, Rui Men, An Yang, Jingren Zhou, Junyang Lin
Implementation: Open-source implementation with H100 optimizations for community use.
Apache 2.0 - See repository for full details.
This model implements the GSPO algorithm described by Zheng et al. (Qwen Team, Alibaba Inc.) with practical optimizations for open-source community use.