Spaces:
Sleeping
Sleeping
Commit ·
9cb1c76
1
Parent(s): b2624ac
- pyproject.toml +3 -3
- train.py +5 -5
pyproject.toml
CHANGED
|
@@ -38,10 +38,10 @@ package-dir = {"server" = "server"}
|
|
| 38 |
# Change cu121 -> cu118 / cu124 to match your CUDA version
|
| 39 |
[tool.uv.sources]
|
| 40 |
torch = [
|
| 41 |
-
{ index = "pytorch-
|
| 42 |
]
|
| 43 |
|
| 44 |
[[tool.uv.index]]
|
| 45 |
-
name = "pytorch-
|
| 46 |
-
url = "https://download.pytorch.org/whl/
|
| 47 |
explicit = true
|
|
|
|
| 38 |
# Change cu121 -> cu118 / cu124 to match your CUDA version
|
| 39 |
[tool.uv.sources]
|
| 40 |
torch = [
|
| 41 |
+
{ index = "pytorch-cu124", marker = "extra == 'train'" },
|
| 42 |
]
|
| 43 |
|
| 44 |
[[tool.uv.index]]
|
| 45 |
+
name = "pytorch-cu124"
|
| 46 |
+
url = "https://download.pytorch.org/whl/cu124"
|
| 47 |
explicit = true
|
train.py
CHANGED
|
@@ -15,14 +15,14 @@ from datasets import Dataset
|
|
| 15 |
|
| 16 |
# ── Config ─────────────────────────────────────────────────────────────────────
|
| 17 |
ENV_URL = os.getenv("ENV_URL", "http://localhost:7860")
|
| 18 |
-
BASE_MODEL = os.getenv("MODEL", "Qwen/Qwen2.5-
|
| 19 |
-
MAX_SEQ_LEN =
|
| 20 |
-
LORA_RANK =
|
| 21 |
BUDGET = 12
|
| 22 |
GRPO_STEPS = 200
|
| 23 |
-
BATCH_SIZE =
|
| 24 |
GRAD_ACCUM = 4
|
| 25 |
-
NUM_ROLLOUTS =
|
| 26 |
|
| 27 |
# ── Model ──────────────────────────────────────────────────────────────────────
|
| 28 |
from unsloth import FastLanguageModel, is_bfloat16_supported
|
|
|
|
| 15 |
|
| 16 |
# ── Config ─────────────────────────────────────────────────────────────────────
|
| 17 |
ENV_URL = os.getenv("ENV_URL", "http://localhost:7860")
|
| 18 |
+
BASE_MODEL = os.getenv("MODEL", "Qwen/Qwen2.5-7B-Instruct")
|
| 19 |
+
MAX_SEQ_LEN = 4096
|
| 20 |
+
LORA_RANK = 32
|
| 21 |
BUDGET = 12
|
| 22 |
GRPO_STEPS = 200
|
| 23 |
+
BATCH_SIZE = 4
|
| 24 |
GRAD_ACCUM = 4
|
| 25 |
+
NUM_ROLLOUTS = 8 # generations per prompt for GRPO
|
| 26 |
|
| 27 |
# ── Model ──────────────────────────────────────────────────────────────────────
|
| 28 |
from unsloth import FastLanguageModel, is_bfloat16_supported
|