Add helper stuff for figures, cleanup

This commit is contained in:
2026-02-20 01:56:28 +01:00
parent 28823dc0b5
commit 101bd81ca1
20 changed files with 1862 additions and 1164 deletions

35
raft/README.md Normal file
View File

@@ -0,0 +1,35 @@
# Retrieval-Augmented Finetuning (RAFT)
**Ablauf**:
## Vorbereiten des Retrieval-Corpus
```bash
python prepare_corpus.py --input_tab ../data/intermediate/selected_topics_documents.csv --out_dir out
```
## Erstellen des RAFT-Datensatzes
```bash
python make_raft_data.py --out_dir out --n_examples 100
```
## Training der QLoRA-Adapter
```bash
python train_mistral_raft.py --train_jsonl out/raft_train.jsonl --out_dir out/mistral_balitwin_lora
```
## Inferenz
### Per Baseline Mistral 7B + PEFT-Adapter
```bash
python rag_chat.py --lora_dir out/mistral_balitwin_lora
```
### Pre-Merged Modell + Adapter
```bash
python rag_chat_merged.py --model_dir /path/to/model_folder --out_dir out
```