ifmanzhang commited on
Commit
4fc9bbb
·
verified ·
1 Parent(s): 312e3ff

Document pruned public archive

Browse files
Files changed (1) hide show
  1. README.md +35 -22
README.md CHANGED
@@ -10,38 +10,51 @@ tags:
10
  - repe
11
  - npc
12
  - game-ai
 
13
  ---
14
 
15
- # Huangquan Wuchang RepE NPC Prototype
16
 
17
- This repository contains preliminary R&D artifacts for the *Huangquan Road* / *Mingjie Kuangye* project.
18
 
19
- It is not part of the current main game runtime. It documents an earlier local NPC-model experiment for the character Wuchang.
20
 
21
- ## Contents
22
 
23
- - `merged_model/`: first merged local model after the taciturn/ruthless LoRA stage.
24
- - `merged_model_v2/`: final merged local Wuchang model after the bilingual archaic-style LoRA stage.
25
- - `finetune/`: QLoRA checkpoints and adapter files.
26
- - `data/pairs/`: Gemini 3 Pro generated contrast-pair training data.
27
- - `vectors/`: RepE steering vectors for taciturn and ruthless traits.
28
- - `outputs/`: layer sweep results.
29
- - `test_logs/`: automated dialogue and plot-routing test logs.
30
- - `src/`, `wuchang_chat*.py`, `test_wuchang*.py`: extraction, steering, routing, chat, and evaluation scripts.
31
- - `TECH_DOC.md`: detailed technical notes.
32
 
33
- ## Summary
34
 
35
- The prototype combines representation engineering and LoRA fine-tuning:
36
 
37
- - Base model: `Qwen/Qwen3.5-9B`
38
- - Traits: taciturn and ruthless steering vectors
39
- - Style target: concise archaic Chinese and archaic English
40
- - Training data: 350 bilingual Wuchang style contrast pairs, plus taciturn/ruthless contrast data
41
- - Final model artifact: `merged_model_v2`
 
 
 
 
 
42
 
43
- The training data was generated with Gemini 3 Pro and then used as project-specific experimental data for the Wuchang NPC prototype.
 
 
 
 
 
 
 
 
 
 
 
 
44
 
45
  ## Boundary
46
 
47
- This was an early experiment and is not integrated into the current released game flow. It should be cited as preliminary model-training work rather than as a current gameplay feature.
 
10
  - repe
11
  - npc
12
  - game-ai
13
+ - preliminary
14
  ---
15
 
16
+ # Huangquan Wuchang RepE / QLoRA NPC Prototype
17
 
18
+ This repository preserves the necessary working traces and model artifacts for a preliminary Wuchang NPC experiment from the Huangquan Road project. It is not the current main game runtime.
19
 
20
+ ## Purpose
21
 
22
+ The experiment explored how to make a local Qwen-based NPC speak in a more archaic, concise, and less modern style. It combines:
23
 
24
+ - Representation Engineering (RepE) steering vectors for taciturn / ruthless traits.
25
+ - QLoRA adapters for style and behavior consolidation.
26
+ - A rule / classifier based plot router for Wuchang-specific narrative triggers.
27
+ - Iterative test logs for prompt variants, routing behavior, language style, and injection resistance.
 
 
 
 
 
28
 
29
+ ## Retained Contents
30
 
31
+ The public archive keeps the materials needed to explain and inspect the work:
32
 
33
+ - `TECH_DOC.md`, `config.yaml`, `requirements.txt`: technical notes and experiment configuration.
34
+ - `data/pairs/*.jsonl`: synthetic contrast data generated with Gemini 3 Pro.
35
+ - `data/generate_*.py`: scripts used to generate the contrast pairs.
36
+ - `src/*.py`: RepE vector extraction, steering application, evaluation, and model utilities.
37
+ - `finetune/train_lora.py`, `finetune/merge_lora.py`: QLoRA training and merge scripts.
38
+ - `finetune/checkpoints/*`: final first-pass LoRA adapter and tokenizer/config files.
39
+ - `finetune/style_checkpoint/*`: final bilingual archaic-style LoRA adapter and tokenizer/config files.
40
+ - `vectors/*.pt`: layer-wise RepE steering vectors.
41
+ - `outputs/*.jsonl`, `outputs/*best_layer.txt`: layer sweep records.
42
+ - `test_logs/*.txt`, `test_wuchang*.py`, `wuchang_chat*.py`: iterative NPC behavior tests and chat prototypes.
43
 
44
+ ## Pruned From the Public Archive
45
+
46
+ The following local files were intentionally removed from the current public revision:
47
+
48
+ - `merged_model/` and `merged_model_v2/` full merged model weights.
49
+ - Intermediate checkpoint folders such as `checkpoint-96`, `checkpoint-192`, `checkpoint-288`, `checkpoint-44`, `checkpoint-88`, and `checkpoint-132`.
50
+ - Optimizer, scheduler, RNG, Python cache, and local tool-configuration files.
51
+
52
+ These files are redundant for assessment evidence because the public archive keeps the final adapters, data, configuration, training scripts, RepE vectors, and test records. Full merged weights can be regenerated from the documented base model and retained adapters if needed.
53
+
54
+ ## Data Provenance
55
+
56
+ The style-control pairs are synthetic contrast data generated with Gemini 3 Pro. They should be described as generated experiment data, not player data or real conversations.
57
 
58
  ## Boundary
59
 
60
+ This is preliminary work. The current Huangquan game uses persona runtime prompts, provider clients, output guards, and optional narrative enhancements as its main NPC dialogue path.