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 README.md
Browse files
README.md
CHANGED
|
@@ -1,3 +1,125 @@
|
|
| 1 |
---
|
| 2 |
license: mit
|
| 3 |
---
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
---
|
| 2 |
license: mit
|
| 3 |
---
|
| 4 |
+
# Learning in Interaction using ArCHer
|
| 5 |
+
|
| 6 |
+
> Interactive fine-tuning and alignment experiments using LoRA, supervised learning, and reinforcement-learning-based adaptation on LLaMA-3.1-8B-Instruct.
|
| 7 |
+
|
| 8 |
+
---
|
| 9 |
+
|
| 10 |
+
## Overview
|
| 11 |
+
|
| 12 |
+
This repository contains checkpoints, training configurations, and experimental artifacts for the project:
|
| 13 |
+
|
| 14 |
+
**Learning in Interaction using ArCHer**
|
| 15 |
+
|
| 16 |
+
The goal of this work is to explore interactive learning paradigms for large language models through:
|
| 17 |
+
|
| 18 |
+
- Supervised Fine-Tuning (SFT)
|
| 19 |
+
- LoRA-based parameter-efficient adaptation
|
| 20 |
+
- Preference and reward-based optimization
|
| 21 |
+
- Future GRPO / ArCHer reinforcement learning methods
|
| 22 |
+
|
| 23 |
+
The experiments are built on top of Meta's **LLaMA-3.1-8B-Instruct** model using the Hugging Face.
|
| 24 |
+
|
| 25 |
+
---
|
| 26 |
+
|
| 27 |
+
## Base Model
|
| 28 |
+
|
| 29 |
+
- **Model:** `meta-llama/Llama-3.1-8B-Instruct`
|
| 30 |
+
- **Framework:** Transformers + PEFT
|
| 31 |
+
- **Training Infrastructure:** Hugging Face Trainer
|
| 32 |
+
- **Fine-Tuning Method:** LoRA
|
| 33 |
+
|
| 34 |
+
---
|
| 35 |
+
|
| 36 |
+
## Repository Structure
|
| 37 |
+
|
| 38 |
+
```text
|
| 39 |
+
Llama-3.1-8B-Instruct/
|
| 40 |
+
β
|
| 41 |
+
βββ sft_lora/
|
| 42 |
+
β βββ checkpoint-1611/
|
| 43 |
+
β βββ adapter_model.safetensors
|
| 44 |
+
β βββ adapter_config.json
|
| 45 |
+
β βββ tokenizer.json
|
| 46 |
+
β βββ tokenizer_config.json
|
| 47 |
+
β βββ trainer_state.json
|
| 48 |
+
β βββ training_args.bin
|
| 49 |
+
β βββ optimizer.pt
|
| 50 |
+
β βββ scheduler.pt
|
| 51 |
+
β βββ rng_state.pth
|
| 52 |
+
β βββ chat_template.jinja
|
| 53 |
+
β
|
| 54 |
+
βββ sft_lora_with_val_splits/
|
| 55 |
+
β βββ checkpoint-2016/
|
| 56 |
+
β βββ adapter_model.safetensors
|
| 57 |
+
β βββ adapter_config.json
|
| 58 |
+
β βββ tokenizer.json
|
| 59 |
+
β βββ tokenizer_config.json
|
| 60 |
+
β βββ trainer_state.json
|
| 61 |
+
β βββ training_args.bin
|
| 62 |
+
β βββ optimizer.pt
|
| 63 |
+
β βββ scheduler.pt
|
| 64 |
+
β βββ rng_state.pth
|
| 65 |
+
β βββ chat_template.jinja
|
| 66 |
+
```
|
| 67 |
+
|
| 68 |
+
---
|
| 69 |
+
|
| 70 |
+
## Experiment Summary
|
| 71 |
+
|
| 72 |
+
| Experiment | Checkpoint | Description |
|
| 73 |
+
|---|---|---|
|
| 74 |
+
| SFT + LoRA | `checkpoint-1611` | Initial supervised fine-tuning using LoRA adapters |
|
| 75 |
+
| SFT + LoRA + Validation Splits | `checkpoint-2016` | Validation-aware training with improved monitoring |
|
| 76 |
+
| ArCHer / GRPO (Upcoming) | TBD | Reinforcement-learning-based interactive optimization |
|
| 77 |
+
|
| 78 |
+
---
|
| 79 |
+
|
| 80 |
+
|
| 81 |
+
## Loading a Checkpoint
|
| 82 |
+
|
| 83 |
+
### Using Transformers + PEFT
|
| 84 |
+
|
| 85 |
+
```python
|
| 86 |
+
from transformers import AutoModelForCausalLM, AutoTokenizer
|
| 87 |
+
from peft import PeftModel
|
| 88 |
+
|
| 89 |
+
base_model = "meta-llama/Llama-3.1-8B-Instruct"
|
| 90 |
+
|
| 91 |
+
# Load base model
|
| 92 |
+
model = AutoModelForCausalLM.from_pretrained(
|
| 93 |
+
base_model,
|
| 94 |
+
device_map="auto",
|
| 95 |
+
torch_dtype="auto"
|
| 96 |
+
)
|
| 97 |
+
|
| 98 |
+
# Load LoRA adapter
|
| 99 |
+
model = PeftModel.from_pretrained(
|
| 100 |
+
model,
|
| 101 |
+
"path_to_checkpoint"
|
| 102 |
+
)
|
| 103 |
+
|
| 104 |
+
# Load tokenizer
|
| 105 |
+
tokenizer = AutoTokenizer.from_pretrained(base_model)
|
| 106 |
+
```
|
| 107 |
+
|
| 108 |
+
---
|
| 109 |
+
|
| 110 |
+
## Notes
|
| 111 |
+
|
| 112 |
+
- Only selected checkpoints and milestone runs are stored.
|
| 113 |
+
- Large files are managed using Git LFS.
|
| 114 |
+
- Intermediate checkpoints are omitted to reduce repository size.
|
| 115 |
+
|
| 116 |
+
---
|
| 117 |
+
|
| 118 |
+
## Planned Work
|
| 119 |
+
|
| 120 |
+
Planned extensions include:
|
| 121 |
+
|
| 122 |
+
- GRPO-based reinforcement learning
|
| 123 |
+
- Multi-turn interaction benchmarks
|
| 124 |
+
- Automated best-checkpoint selection
|
| 125 |
+
- Evaluation pipelines and benchmarking suites
|