Reinforcement Learning
Transformers
Safetensors
qwen3.5
playpen
score
self-correction
dialogue-games
Instructions to use Valhari14/Learning-in-Interaction with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Valhari14/Learning-in-Interaction with Transformers:
# pip install -U transformers accelerate # Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("Valhari14/Learning-in-Interaction", device_map="auto") - Notebooks
- Google Colab
- Kaggle
Update information about the model checkpoints
Browse files
README.md
CHANGED
|
@@ -1,166 +1,60 @@
|
|
| 1 |
---
|
| 2 |
-
license: mit
|
| 3 |
library_name: transformers
|
| 4 |
-
base_model:
|
| 5 |
tags:
|
| 6 |
-
-
|
| 7 |
-
-
|
| 8 |
-
-
|
| 9 |
-
-
|
| 10 |
- reinforcement-learning
|
| 11 |
-
-
|
| 12 |
-
- transformers
|
| 13 |
-
- archer
|
| 14 |
---
|
| 15 |
|
| 16 |
-
# Learning in Interaction
|
| 17 |
|
| 18 |
-
|
| 19 |
|
| 20 |
-
---
|
| 21 |
-
|
| 22 |
-
## Overview
|
| 23 |
-
|
| 24 |
-
This repository contains checkpoints, training configurations, and experimental artifacts for the project:
|
| 25 |
-
|
| 26 |
-
**Learning in Interaction using ArCHer**
|
| 27 |
-
|
| 28 |
-
The goal of this work is to explore interactive learning paradigms for large language models through:
|
| 29 |
-
|
| 30 |
-
- Supervised Fine-Tuning (SFT)
|
| 31 |
-
- LoRA-based parameter-efficient adaptation
|
| 32 |
-
- Preference and reward-based optimization
|
| 33 |
-
- Future GRPO / ArCHer reinforcement learning methods
|
| 34 |
-
|
| 35 |
-
The experiments are built on top of Meta's **LLaMA-3.1-8B-Instruct** model using the Hugging Face ecosystem.
|
| 36 |
-
|
| 37 |
-
---
|
| 38 |
|
| 39 |
-
##
|
| 40 |
|
| 41 |
-
|
| 42 |
-
-
|
| 43 |
-
-
|
| 44 |
-
|
|
|
|
| 45 |
|
| 46 |
-
---
|
| 47 |
-
|
| 48 |
-
## Repository Structure
|
| 49 |
-
|
| 50 |
-
```text
|
| 51 |
-
Llama-3.1-8B-Instruct/
|
| 52 |
-
│
|
| 53 |
-
├── sft_lora/
|
| 54 |
-
│ └── checkpoint-1611/
|
| 55 |
-
│ ├── adapter_model.safetensors
|
| 56 |
-
│ ├── adapter_config.json
|
| 57 |
-
│ ├── tokenizer.json
|
| 58 |
-
│ ├── tokenizer_config.json
|
| 59 |
-
│ ├── trainer_state.json
|
| 60 |
-
│ ├── training_args.bin
|
| 61 |
-
│ ├── optimizer.pt
|
| 62 |
-
│ ├── scheduler.pt
|
| 63 |
-
│ ├── rng_state.pth
|
| 64 |
-
│ └── chat_template.jinja
|
| 65 |
-
│
|
| 66 |
-
├── sft_lora_with_val_splits/
|
| 67 |
-
│ └── checkpoint-2016/
|
| 68 |
-
│ ├── adapter_model.safetensors
|
| 69 |
-
│ ├── adapter_config.json
|
| 70 |
-
│ ├── tokenizer.json
|
| 71 |
-
│ ├── tokenizer_config.json
|
| 72 |
-
│ ├── trainer_state.json
|
| 73 |
-
│ ├── training_args.bin
|
| 74 |
-
│ ├── optimizer.pt
|
| 75 |
-
│ ├── scheduler.pt
|
| 76 |
-
│ ├── rng_state.pth
|
| 77 |
-
│ └── chat_template.jinja
|
| 78 |
-
```
|
| 79 |
-
|
| 80 |
-
---
|
| 81 |
-
|
| 82 |
-
## Experiment Summary
|
| 83 |
-
|
| 84 |
-
| Experiment | Checkpoint | Description |
|
| 85 |
-
|---|---|---|
|
| 86 |
-
| SFT + LoRA | `checkpoint-1611` | Initial supervised fine-tuning using LoRA adapters |
|
| 87 |
-
| SFT + LoRA + Validation Splits | `checkpoint-2016` | Validation-aware training with improved monitoring |
|
| 88 |
-
| ArCHer / GRPO (Upcoming) | TBD | Reinforcement-learning-based interactive optimization |
|
| 89 |
-
|
| 90 |
-
---
|
| 91 |
|
| 92 |
-
##
|
| 93 |
|
| 94 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 95 |
|
| 96 |
-
```python
|
| 97 |
-
from transformers import AutoModelForCausalLM, AutoTokenizer
|
| 98 |
-
from peft import PeftModel
|
| 99 |
|
| 100 |
-
base_model = "meta-llama/Llama-3.1-8B-Instruct"
|
| 101 |
|
| 102 |
-
#
|
| 103 |
-
model = AutoModelForCausalLM.from_pretrained(
|
| 104 |
-
base_model,
|
| 105 |
-
device_map="auto",
|
| 106 |
-
torch_dtype="auto"
|
| 107 |
-
)
|
| 108 |
|
| 109 |
-
|
| 110 |
-
model = PeftModel.from_pretrained(
|
| 111 |
-
model,
|
| 112 |
-
"path_to_checkpoint"
|
| 113 |
-
)
|
| 114 |
|
| 115 |
-
|
| 116 |
-
|
| 117 |
-
|
|
|
|
|
|
|
|
|
|
| 118 |
|
| 119 |
-
|
| 120 |
-
|
| 121 |
-
## Example Inference
|
| 122 |
-
|
| 123 |
-
```python
|
| 124 |
-
inputs = tokenizer(
|
| 125 |
-
"Explain reinforcement learning in simple terms.",
|
| 126 |
-
return_tensors="pt"
|
| 127 |
-
).to(model.device)
|
| 128 |
-
|
| 129 |
-
outputs = model.generate(
|
| 130 |
-
**inputs,
|
| 131 |
-
max_new_tokens=128
|
| 132 |
-
)
|
| 133 |
-
|
| 134 |
-
print(tokenizer.decode(outputs[0], skip_special_tokens=True))
|
| 135 |
-
```
|
| 136 |
-
|
| 137 |
-
---
|
| 138 |
-
|
| 139 |
-
## Notes
|
| 140 |
-
|
| 141 |
-
- Only selected checkpoints and milestone runs are stored.
|
| 142 |
-
- Large files are managed using Git LFS.
|
| 143 |
-
- Intermediate checkpoints are omitted to reduce repository size.
|
| 144 |
-
- Additional experiments and evaluation results will be added over time.
|
| 145 |
-
|
| 146 |
-
---
|
| 147 |
-
|
| 148 |
-
## Planned Work
|
| 149 |
-
|
| 150 |
-
Future extensions include:
|
| 151 |
-
|
| 152 |
-
- GRPO-based reinforcement learning
|
| 153 |
-
- Human feedback integration
|
| 154 |
-
- Multi-turn interaction benchmarks
|
| 155 |
-
- Automated best-checkpoint selection
|
| 156 |
-
- Evaluation pipelines and benchmarking suites
|
| 157 |
-
|
| 158 |
-
---
|
| 159 |
|
| 160 |
-
##
|
| 161 |
|
| 162 |
-
|
| 163 |
|
| 164 |
-
|
| 165 |
|
| 166 |
-
|
|
|
|
| 1 |
---
|
|
|
|
| 2 |
library_name: transformers
|
| 3 |
+
base_model: Qwen/Qwen3.5-9B
|
| 4 |
tags:
|
| 5 |
+
- qwen3.5
|
| 6 |
+
- playpen
|
| 7 |
+
- score
|
| 8 |
+
- self-correction
|
| 9 |
- reinforcement-learning
|
| 10 |
+
- dialogue-games
|
|
|
|
|
|
|
| 11 |
---
|
| 12 |
|
| 13 |
+
# Learning in Interaction
|
| 14 |
|
| 15 |
+
This repository contains the merged model checkpoints from our study of **SCoRe (Self-Correction via Reinforcement Learning)** in Playpen dialogue games.
|
| 16 |
|
| 17 |
+
We investigate whether a two-stage self-correction RL procedure, originally developed for mathematical and coding tasks, transfers to multi-turn dialogue games with game-based feedback.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 18 |
|
| 19 |
+
## Models
|
| 20 |
|
| 21 |
+
| Checkpoint | Description |
|
| 22 |
+
|---|---|
|
| 23 |
+
| `qwen-sft-sp_merged` | Qwen3.5-9B after SFT training |
|
| 24 |
+
| `score-Qwen3.5-9B-singleplayer_merged-15_08` | SCoRe trained from the base Qwen3.5-9B |
|
| 25 |
+
| `score-Qwen3.5-9B-sft-init-sp_merged-16_08` | SFT warm-up followed by SCoRe on Qwen3.5-9B |
|
| 26 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 27 |
|
| 28 |
+
## Training
|
| 29 |
|
| 30 |
+
- **Base model:** Qwen3.5-9B
|
| 31 |
+
- **Environment:** Playpen dialogue games
|
| 32 |
+
- **Games:** AdventureGame, TextMapWorld, TextMapWorld GraphReasoning, TextMapWorld SpecificRoom, Wordle
|
| 33 |
+
- **SFT:** 2,677 successful episodes, 3 epochs, LoRA
|
| 34 |
+
- **SCoRe Stage I:** 3 epochs
|
| 35 |
+
- **SCoRe Stage II:** 5 epochs
|
| 36 |
+
- **Hardware:** 2 × NVIDIA H100 80GB
|
| 37 |
+
- **Total training time:** approximately 7 days, excluding hyperparameter tuning
|
| 38 |
|
|
|
|
|
|
|
|
|
|
| 39 |
|
|
|
|
| 40 |
|
| 41 |
+
## Evaluation
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 42 |
|
| 43 |
+
We evaluate:
|
|
|
|
|
|
|
|
|
|
|
|
|
| 44 |
|
| 45 |
+
- win rate across the first and second attempts
|
| 46 |
+
- abort rate
|
| 47 |
+
- self-correction and regression rates
|
| 48 |
+
- turns and token usage
|
| 49 |
+
- Playpen/ClemScore
|
| 50 |
+
- single-player and static-store evaluations
|
| 51 |
|
| 52 |
+
The current experiments are exploratory, with **10 evaluation episodes per game and model**. Results should therefore be interpreted as directional rather than conclusive.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 53 |
|
| 54 |
+
## Intended Use
|
| 55 |
|
| 56 |
+
These checkpoints are intended for research on **reinforcement learning, self-correction, and learning from interaction in dialogue games**. They have not been evaluated as general-purpose improved versions of Qwen3.5-9B.
|
| 57 |
|
| 58 |
+
## Acknowledgements
|
| 59 |
|
| 60 |
+
This work builds on **SCoRe**, **Playpen**, and **Clembench**, and uses Qwen3.5-9B as the base model.
|