Instructions to use Prometheus17/game24-rl with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Prometheus17/game24-rl with Transformers:
# Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("Prometheus17/game24-rl", dtype="auto") - Notebooks
- Google Colab
- Kaggle
Add handoff2 GRPO checkpoint-500 adapter
Browse files- .gitattributes +1 -0
- handoff2-grpo-checkpoint-500/README.md +57 -0
- handoff2-grpo-checkpoint-500/adapter_config.json +48 -0
- handoff2-grpo-checkpoint-500/adapter_model.safetensors +3 -0
- handoff2-grpo-checkpoint-500/chat_template.jinja +54 -0
- handoff2-grpo-checkpoint-500/run-config.json +22 -0
- handoff2-grpo-checkpoint-500/tokenizer.json +3 -0
- handoff2-grpo-checkpoint-500/tokenizer_config.json +32 -0
- handoff2-grpo-checkpoint-500/train-run-metadata.json +49 -0
- handoff2-grpo-checkpoint-500/trainer_state.json +0 -0
.gitattributes
CHANGED
|
@@ -35,3 +35,4 @@ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
|
|
| 35 |
*tfevents* filter=lfs diff=lfs merge=lfs -text
|
| 36 |
sft-final/tokenizer.json filter=lfs diff=lfs merge=lfs -text
|
| 37 |
grpo-lora-final/tokenizer.json filter=lfs diff=lfs merge=lfs -text
|
|
|
|
|
|
| 35 |
*tfevents* filter=lfs diff=lfs merge=lfs -text
|
| 36 |
sft-final/tokenizer.json filter=lfs diff=lfs merge=lfs -text
|
| 37 |
grpo-lora-final/tokenizer.json filter=lfs diff=lfs merge=lfs -text
|
| 38 |
+
handoff2-grpo-checkpoint-500/tokenizer.json filter=lfs diff=lfs merge=lfs -text
|
handoff2-grpo-checkpoint-500/README.md
ADDED
|
@@ -0,0 +1,57 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
library_name: peft
|
| 3 |
+
pipeline_tag: text-generation
|
| 4 |
+
base_model: Qwen/Qwen2.5-1.5B-Instruct
|
| 5 |
+
tags:
|
| 6 |
+
- game24
|
| 7 |
+
- grpo
|
| 8 |
+
- lora
|
| 9 |
+
- qwen2.5
|
| 10 |
+
- trl
|
| 11 |
+
---
|
| 12 |
+
|
| 13 |
+
# Game24 RL Handoff2 GRPO Checkpoint-500
|
| 14 |
+
|
| 15 |
+
This folder contains the handoff2 LoRA GRPO adapter for the Game24 RL course project.
|
| 16 |
+
|
| 17 |
+
## Lineage
|
| 18 |
+
|
| 19 |
+
- Base public model: `Qwen/Qwen2.5-1.5B-Instruct`
|
| 20 |
+
- Project SFT base used for this adapter: `Prometheus17/game24-rl`, subfolder `sft-final`
|
| 21 |
+
- This adapter: `Prometheus17/game24-rl`, subfolder `handoff2-grpo-checkpoint-500`
|
| 22 |
+
|
| 23 |
+
The adapter was trained from the project handoff1 SFT-final checkpoint, not directly from the public Qwen base model.
|
| 24 |
+
|
| 25 |
+
## Training Summary
|
| 26 |
+
|
| 27 |
+
- Method: LoRA GRPO
|
| 28 |
+
- Reward profile: `closure_control_smooth`
|
| 29 |
+
- Max completion length: 4096
|
| 30 |
+
- Num generations: 8
|
| 31 |
+
- Learning rate: 5e-6
|
| 32 |
+
- Beta: 0
|
| 33 |
+
- Scale rewards: none
|
| 34 |
+
- Loss type: dr_grpo
|
| 35 |
+
- Delivered checkpoint: step 500
|
| 36 |
+
|
| 37 |
+
## Evaluation Summary
|
| 38 |
+
|
| 39 |
+
Direct greedy decoding, `max_new_tokens=4096`, strict verifier, repo-local validation/test split:
|
| 40 |
+
|
| 41 |
+
| split | solved / total | accuracy |
|
| 42 |
+
| --- | ---: | ---: |
|
| 43 |
+
| validation | 128/136 | 94.12% |
|
| 44 |
+
| test | 129/137 | 94.16% |
|
| 45 |
+
| validation + test | 257/273 | 94.14% |
|
| 46 |
+
|
| 47 |
+
## Loading Sketch
|
| 48 |
+
|
| 49 |
+
```python
|
| 50 |
+
from transformers import AutoModelForCausalLM, AutoTokenizer
|
| 51 |
+
from peft import PeftModel
|
| 52 |
+
|
| 53 |
+
repo = "Prometheus17/game24-rl"
|
| 54 |
+
base = AutoModelForCausalLM.from_pretrained(repo, subfolder="sft-final", device_map="auto")
|
| 55 |
+
tokenizer = AutoTokenizer.from_pretrained(repo, subfolder="sft-final")
|
| 56 |
+
model = PeftModel.from_pretrained(base, repo, subfolder="handoff2-grpo-checkpoint-500")
|
| 57 |
+
```
|
handoff2-grpo-checkpoint-500/adapter_config.json
ADDED
|
@@ -0,0 +1,48 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"alora_invocation_tokens": null,
|
| 3 |
+
"alpha_pattern": {},
|
| 4 |
+
"arrow_config": null,
|
| 5 |
+
"auto_mapping": null,
|
| 6 |
+
"base_model_name_or_path": "outputs/experiments/baseline_format_v2_full_5000_from800/final",
|
| 7 |
+
"bias": "none",
|
| 8 |
+
"corda_config": null,
|
| 9 |
+
"ensure_weight_tying": false,
|
| 10 |
+
"eva_config": null,
|
| 11 |
+
"exclude_modules": null,
|
| 12 |
+
"fan_in_fan_out": false,
|
| 13 |
+
"inference_mode": true,
|
| 14 |
+
"init_lora_weights": true,
|
| 15 |
+
"layer_replication": null,
|
| 16 |
+
"layers_pattern": null,
|
| 17 |
+
"layers_to_transform": null,
|
| 18 |
+
"loftq_config": {},
|
| 19 |
+
"lora_alpha": 32,
|
| 20 |
+
"lora_bias": false,
|
| 21 |
+
"lora_dropout": 0.05,
|
| 22 |
+
"lora_ga_config": null,
|
| 23 |
+
"megatron_config": null,
|
| 24 |
+
"megatron_core": "megatron.core",
|
| 25 |
+
"modules_to_save": null,
|
| 26 |
+
"peft_type": "LORA",
|
| 27 |
+
"peft_version": "0.19.1",
|
| 28 |
+
"qalora_group_size": 16,
|
| 29 |
+
"r": 16,
|
| 30 |
+
"rank_pattern": {},
|
| 31 |
+
"revision": null,
|
| 32 |
+
"target_modules": [
|
| 33 |
+
"o_proj",
|
| 34 |
+
"gate_proj",
|
| 35 |
+
"v_proj",
|
| 36 |
+
"q_proj",
|
| 37 |
+
"up_proj",
|
| 38 |
+
"down_proj",
|
| 39 |
+
"k_proj"
|
| 40 |
+
],
|
| 41 |
+
"target_parameters": null,
|
| 42 |
+
"task_type": "CAUSAL_LM",
|
| 43 |
+
"trainable_token_indices": null,
|
| 44 |
+
"use_bdlora": null,
|
| 45 |
+
"use_dora": false,
|
| 46 |
+
"use_qalora": false,
|
| 47 |
+
"use_rslora": false
|
| 48 |
+
}
|
handoff2-grpo-checkpoint-500/adapter_model.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:7dff1e680ac45bdd33a0f2cf3ac7c9d2cbc13400eb0c39ece06b784b6730587c
|
| 3 |
+
size 73911112
|
handoff2-grpo-checkpoint-500/chat_template.jinja
ADDED
|
@@ -0,0 +1,54 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{%- if tools %}
|
| 2 |
+
{{- '<|im_start|>system\n' }}
|
| 3 |
+
{%- if messages[0]['role'] == 'system' %}
|
| 4 |
+
{{- messages[0]['content'] }}
|
| 5 |
+
{%- else %}
|
| 6 |
+
{{- 'You are Qwen, created by Alibaba Cloud. You are a helpful assistant.' }}
|
| 7 |
+
{%- endif %}
|
| 8 |
+
{{- "\n\n# Tools\n\nYou may call one or more functions to assist with the user query.\n\nYou are provided with function signatures within <tools></tools> XML tags:\n<tools>" }}
|
| 9 |
+
{%- for tool in tools %}
|
| 10 |
+
{{- "\n" }}
|
| 11 |
+
{{- tool | tojson }}
|
| 12 |
+
{%- endfor %}
|
| 13 |
+
{{- "\n</tools>\n\nFor each function call, return a json object with function name and arguments within <tool_call></tool_call> XML tags:\n<tool_call>\n{\"name\": <function-name>, \"arguments\": <args-json-object>}\n</tool_call><|im_end|>\n" }}
|
| 14 |
+
{%- else %}
|
| 15 |
+
{%- if messages[0]['role'] == 'system' %}
|
| 16 |
+
{{- '<|im_start|>system\n' + messages[0]['content'] + '<|im_end|>\n' }}
|
| 17 |
+
{%- else %}
|
| 18 |
+
{{- '<|im_start|>system\nYou are Qwen, created by Alibaba Cloud. You are a helpful assistant.<|im_end|>\n' }}
|
| 19 |
+
{%- endif %}
|
| 20 |
+
{%- endif %}
|
| 21 |
+
{%- for message in messages %}
|
| 22 |
+
{%- if (message.role == "user") or (message.role == "system" and not loop.first) or (message.role == "assistant" and not message.tool_calls) %}
|
| 23 |
+
{{- '<|im_start|>' + message.role + '\n' + message.content + '<|im_end|>' + '\n' }}
|
| 24 |
+
{%- elif message.role == "assistant" %}
|
| 25 |
+
{{- '<|im_start|>' + message.role }}
|
| 26 |
+
{%- if message.content %}
|
| 27 |
+
{{- '\n' + message.content }}
|
| 28 |
+
{%- endif %}
|
| 29 |
+
{%- for tool_call in message.tool_calls %}
|
| 30 |
+
{%- if tool_call.function is defined %}
|
| 31 |
+
{%- set tool_call = tool_call.function %}
|
| 32 |
+
{%- endif %}
|
| 33 |
+
{{- '\n<tool_call>\n{"name": "' }}
|
| 34 |
+
{{- tool_call.name }}
|
| 35 |
+
{{- '", "arguments": ' }}
|
| 36 |
+
{{- tool_call.arguments | tojson }}
|
| 37 |
+
{{- '}\n</tool_call>' }}
|
| 38 |
+
{%- endfor %}
|
| 39 |
+
{{- '<|im_end|>\n' }}
|
| 40 |
+
{%- elif message.role == "tool" %}
|
| 41 |
+
{%- if (loop.index0 == 0) or (messages[loop.index0 - 1].role != "tool") %}
|
| 42 |
+
{{- '<|im_start|>user' }}
|
| 43 |
+
{%- endif %}
|
| 44 |
+
{{- '\n<tool_response>\n' }}
|
| 45 |
+
{{- message.content }}
|
| 46 |
+
{{- '\n</tool_response>' }}
|
| 47 |
+
{%- if loop.last or (messages[loop.index0 + 1].role != "tool") %}
|
| 48 |
+
{{- '<|im_end|>\n' }}
|
| 49 |
+
{%- endif %}
|
| 50 |
+
{%- endif %}
|
| 51 |
+
{%- endfor %}
|
| 52 |
+
{%- if add_generation_prompt %}
|
| 53 |
+
{{- '<|im_start|>assistant\n' }}
|
| 54 |
+
{%- endif %}
|
handoff2-grpo-checkpoint-500/run-config.json
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"schema_version": "handoff1-grpo-final-run-config-v1",
|
| 3 |
+
"base_checkpoint": "outputs/experiments/baseline_format_v2_full_5000_from800/final",
|
| 4 |
+
"manifest": "data/processed/splits/standard-game24-v1.json",
|
| 5 |
+
"tot_manifest": "data/processed/splits/official-tot-overnight-v1.json",
|
| 6 |
+
"tot_split": "tot_all_1362",
|
| 7 |
+
"split": "train",
|
| 8 |
+
"prompt_style": "qwen_chat",
|
| 9 |
+
"max_new_tokens": 4096,
|
| 10 |
+
"num_generations": 8,
|
| 11 |
+
"max_steps": 2000,
|
| 12 |
+
"save_steps": 500,
|
| 13 |
+
"logging_steps": 1,
|
| 14 |
+
"learning_rate": "5e-6",
|
| 15 |
+
"beta": 0,
|
| 16 |
+
"scale_rewards": "none",
|
| 17 |
+
"gradient_accumulation_steps": 8,
|
| 18 |
+
"reward_profile": "closure_control_smooth",
|
| 19 |
+
"mask_truncated_completions": false,
|
| 20 |
+
"remove_unused_columns": false,
|
| 21 |
+
"training_mode": "LoRA adapter"
|
| 22 |
+
}
|
handoff2-grpo-checkpoint-500/tokenizer.json
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:3fd169731d2cbde95e10bf356d66d5997fd885dd8dbb6fb4684da3f23b2585d8
|
| 3 |
+
size 11421892
|
handoff2-grpo-checkpoint-500/tokenizer_config.json
ADDED
|
@@ -0,0 +1,32 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"add_prefix_space": false,
|
| 3 |
+
"backend": "tokenizers",
|
| 4 |
+
"bos_token": null,
|
| 5 |
+
"clean_up_tokenization_spaces": false,
|
| 6 |
+
"eos_token": "<|im_end|>",
|
| 7 |
+
"errors": "replace",
|
| 8 |
+
"extra_special_tokens": [
|
| 9 |
+
"<|im_start|>",
|
| 10 |
+
"<|im_end|>",
|
| 11 |
+
"<|object_ref_start|>",
|
| 12 |
+
"<|object_ref_end|>",
|
| 13 |
+
"<|box_start|>",
|
| 14 |
+
"<|box_end|>",
|
| 15 |
+
"<|quad_start|>",
|
| 16 |
+
"<|quad_end|>",
|
| 17 |
+
"<|vision_start|>",
|
| 18 |
+
"<|vision_end|>",
|
| 19 |
+
"<|vision_pad|>",
|
| 20 |
+
"<|image_pad|>",
|
| 21 |
+
"<|video_pad|>"
|
| 22 |
+
],
|
| 23 |
+
"is_local": true,
|
| 24 |
+
"local_files_only": false,
|
| 25 |
+
"model_max_length": 131072,
|
| 26 |
+
"pad_token": "<|endoftext|>",
|
| 27 |
+
"padding_side": "left",
|
| 28 |
+
"split_special_tokens": false,
|
| 29 |
+
"tokenizer_class": "Qwen2Tokenizer",
|
| 30 |
+
"truncation_side": "left",
|
| 31 |
+
"unk_token": null
|
| 32 |
+
}
|
handoff2-grpo-checkpoint-500/train-run-metadata.json
ADDED
|
@@ -0,0 +1,49 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"beta": 0.0,
|
| 3 |
+
"gradient_accumulation_steps": 8,
|
| 4 |
+
"grpo_config_kwargs": {
|
| 5 |
+
"beta": 0.0,
|
| 6 |
+
"bf16": true,
|
| 7 |
+
"gradient_accumulation_steps": 8,
|
| 8 |
+
"learning_rate": 5e-06,
|
| 9 |
+
"logging_steps": 1,
|
| 10 |
+
"loss_type": "dr_grpo",
|
| 11 |
+
"mask_truncated_completions": false,
|
| 12 |
+
"max_completion_length": 4096,
|
| 13 |
+
"max_steps": 2000,
|
| 14 |
+
"num_generations": 8,
|
| 15 |
+
"output_dir": "outputs/experiments/handoff1_grpo_closure_control_smooth_v1_2000/train",
|
| 16 |
+
"per_device_train_batch_size": 1,
|
| 17 |
+
"remove_unused_columns": false,
|
| 18 |
+
"report_to": [
|
| 19 |
+
"tensorboard"
|
| 20 |
+
],
|
| 21 |
+
"save_steps": 500,
|
| 22 |
+
"scale_rewards": "none",
|
| 23 |
+
"temperature": 0.8,
|
| 24 |
+
"top_p": 0.95
|
| 25 |
+
},
|
| 26 |
+
"initial_adapter": null,
|
| 27 |
+
"lora_alpha": 32,
|
| 28 |
+
"lora_dropout": 0.05,
|
| 29 |
+
"lora_rank": 16,
|
| 30 |
+
"manifest": "data/processed/splits/standard-game24-v1.json",
|
| 31 |
+
"mask_truncated_completions": false,
|
| 32 |
+
"max_prompt_length_applied_by_trl": false,
|
| 33 |
+
"max_prompt_length_requested": 256,
|
| 34 |
+
"max_steps": 2000,
|
| 35 |
+
"model_name_or_path": "outputs/experiments/baseline_format_v2_full_5000_from800/final",
|
| 36 |
+
"num_generations": 8,
|
| 37 |
+
"output_dir": "outputs/experiments/handoff1_grpo_closure_control_smooth_v1_2000/train",
|
| 38 |
+
"peft_mode": "lora",
|
| 39 |
+
"pool_manifest": "outputs/experiments/handoff1_grpo_closure_control_smooth_v1_2000/pool/pool-manifest.json",
|
| 40 |
+
"prompt_records": 1462,
|
| 41 |
+
"remove_unused_columns": false,
|
| 42 |
+
"reward_profile": "closure_control_smooth",
|
| 43 |
+
"scale_rewards": "none",
|
| 44 |
+
"schema_version": "game24-grpo-train-run-v1",
|
| 45 |
+
"skipped_grpo_config_kwargs": {},
|
| 46 |
+
"split": "train",
|
| 47 |
+
"temperature": 0.8,
|
| 48 |
+
"top_p": 0.95
|
| 49 |
+
}
|
handoff2-grpo-checkpoint-500/trainer_state.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|