Instructions to use hbx/JustRL-DeepSeek-1.5B with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use hbx/JustRL-DeepSeek-1.5B with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="hbx/JustRL-DeepSeek-1.5B") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("hbx/JustRL-DeepSeek-1.5B") model = AutoModelForCausalLM.from_pretrained("hbx/JustRL-DeepSeek-1.5B", 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]:])) - Inference
- Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use hbx/JustRL-DeepSeek-1.5B with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "hbx/JustRL-DeepSeek-1.5B" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "hbx/JustRL-DeepSeek-1.5B", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/hbx/JustRL-DeepSeek-1.5B
- SGLang
How to use hbx/JustRL-DeepSeek-1.5B 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 "hbx/JustRL-DeepSeek-1.5B" \ --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": "hbx/JustRL-DeepSeek-1.5B", "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 "hbx/JustRL-DeepSeek-1.5B" \ --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": "hbx/JustRL-DeepSeek-1.5B", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use hbx/JustRL-DeepSeek-1.5B with Docker Model Runner:
docker model run hf.co/hbx/JustRL-DeepSeek-1.5B
疑问:没有使用拒绝采样或者动态采样,用GRPO哪里来的梯度呀
#3
by hujh4 - opened
疑问:没有使用拒绝采样或者动态采样的情况下,数据相对于模型的难度不稳定,用GRPO不是会经常std为0吗,这样不是经常没有梯度吗
可以参考论文 https://arxiv.org/pdf/2512.16649 里的 Figure 2 中间这张图,DAPO-math-17k 这个数据集对于 Distill-1.5B 的难度其实还是比较合适的,在几千步的训练中 reward 还是比较有信号的。
另外想再问一下,为什么是32卡训了15天,这个配置也是让人有点困惑?
是说用卡数,还是为什么训 15 天?
主要是卡数,因为大致固定训练的总样本数之后,训练时间依据训练卡数会变化。我的疑问主要是为啥是只用了32卡训15天这么久,而不是64/128卡可能训更短时间?15天训一个RL直觉上确实时间有点长
因为当时算力资源比较有限,最多只能支撑 4 台机器启动的训练。