Text Generation
Transformers
Safetensors
Thai
llm
thai
mathematics
reasoning
lora
grpo
conversational
Instructions to use zoeythanayot/gemma3-it-grpo-thai with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use zoeythanayot/gemma3-it-grpo-thai with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="zoeythanayot/gemma3-it-grpo-thai") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("zoeythanayot/gemma3-it-grpo-thai", dtype="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use zoeythanayot/gemma3-it-grpo-thai with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "zoeythanayot/gemma3-it-grpo-thai" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "zoeythanayot/gemma3-it-grpo-thai", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/zoeythanayot/gemma3-it-grpo-thai
- SGLang
How to use zoeythanayot/gemma3-it-grpo-thai 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 "zoeythanayot/gemma3-it-grpo-thai" \ --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": "zoeythanayot/gemma3-it-grpo-thai", "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 "zoeythanayot/gemma3-it-grpo-thai" \ --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": "zoeythanayot/gemma3-it-grpo-thai", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use zoeythanayot/gemma3-it-grpo-thai with Docker Model Runner:
docker model run hf.co/zoeythanayot/gemma3-it-grpo-thai
Update README.md
Browse files
README.md
CHANGED
|
@@ -78,22 +78,13 @@ Below are the reward values observed during training:
|
|
| 78 |
|
| 79 |
| Step | Reward |
|
| 80 |
|------|--------|
|
| 81 |
-
|
|
| 82 |
-
|
|
| 83 |
-
|
|
| 84 |
-
|
| 85 |
-
|
| 86 |
-
|
| 87 |
-
|
| 88 |
-
| 80 | 0.0048 |
|
| 89 |
-
| 90 | 0.0048 |
|
| 90 |
-
| 100 | 0.0048 |
|
| 91 |
-
| 110 | 0.0049 |
|
| 92 |
-
| 120 | 0.0050 |
|
| 93 |
-
|
| 94 |
-
- Reward ค่อย ๆ เพิ่มขึ้นช่วงแรก (10 → 50)
|
| 95 |
-
- Stabilize ที่ ~0.0048–0.0050 หลัง step 60
|
| 96 |
-
- แสดงถึง convergence ของโมเดลต่อ reward function
|
| 97 |
|
| 98 |
---
|
| 99 |
|
|
@@ -132,7 +123,10 @@ with torch.inference_mode():
|
|
| 132 |
top_p=0.9
|
| 133 |
)
|
| 134 |
|
| 135 |
-
|
|
|
|
|
|
|
|
|
|
| 136 |
```
|
| 137 |
---
|
| 138 |
|
|
|
|
| 78 |
|
| 79 |
| Step | Reward |
|
| 80 |
|------|--------|
|
| 81 |
+
| 100 | 0.0030 |
|
| 82 |
+
| 200 | 0.0040 |
|
| 83 |
+
| 280 | 0.0042 |
|
| 84 |
+
|
| 85 |
+
- Reward มีแนวโน้ม ค่อย ๆ เพิ่มขึ้นต่อเนื่อง ในช่วงต้นการเทรน (Step 100 → 200 → 280)
|
| 86 |
+
- ค่า Reward อยู่ราว ๆ 0.0030 → 0.0040 → 0.0042 แสดงถึงการปรับตัวของโมเดลตาม reward function
|
| 87 |
+
- แนวโน้มชี้ว่าโมเดลกำลัง เข้าใกล้ภาวะเสถียร (convergence) แต่ยังไม่ถึงจุด plateau เหมือนกรณีที่ stabilize แถว ~0.0048–0.0050 หากเทรนต่อไปอีก มีโอกาสที่ค่า Reward จะคงที่ในระดับสูงขึ้น (plateau)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 88 |
|
| 89 |
---
|
| 90 |
|
|
|
|
| 123 |
top_p=0.9
|
| 124 |
)
|
| 125 |
|
| 126 |
+
input_length = inputs.shape[1]
|
| 127 |
+
new_tokens = output_ids[0, input_length:]
|
| 128 |
+
resp = tok.decode(new_tokens, skip_special_tokens=True)
|
| 129 |
+
print(resp.strip())
|
| 130 |
```
|
| 131 |
---
|
| 132 |
|