japhba commited on
Commit
a8be95d
·
verified ·
1 Parent(s): e609c09

Improve model card for code_elegance

Browse files
Files changed (1) hide show
  1. README.md +41 -14
README.md CHANGED
@@ -2,6 +2,11 @@
2
  base_model: Qwen/Qwen3-14B
3
  library_name: peft
4
  pipeline_tag: text-generation
 
 
 
 
 
5
  tags:
6
  - lora
7
  - peft
@@ -13,40 +18,53 @@ tags:
13
 
14
  # multitier-lora-tier4-code-elegance
15
 
16
- This repository contains the best-selected LoRA adapter for `code_elegance` from the multitier LoRA sweep.
17
 
18
- ## Model Details
19
 
20
  - Base model: `Qwen/Qwen3-14B`
21
  - Tier: `4` (Preference and taste)
22
  - LoRA identifier: `code_elegance`
 
23
  - Teacher model used for synthetic data generation: `gemini-3.1-flash-lite-preview`
24
  - Training objective: Preference optimization (DPO/IPO) on synthetic chosen/rejected pairs.
25
  - Best checkpoint metric: `pairwise_acc = 1.0000` at step `600`
26
  - Training rows used: `1200`
27
  - Evaluation rows used: `100`
28
 
29
- ## Intended Behavior
30
 
31
- Code that is simpler than it first appears to permit, with names that identify the right abstraction, minimal incidental state, and logic that stays legible under maintenance.
 
 
32
 
33
  - Prompt domains: data_pipeline, cli_tool, parser, web_handler, numerical_routine
34
  - Degradation axes: unnecessary abstraction layers or indirection, poor naming or misleading local concepts, hidden mutation or side effects, dead flexibility nobody needs
35
 
36
- ## Files
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
37
 
38
  - `adapter_model.safetensors` and `adapter_config.json`: the selected PEFT adapter weights
 
39
  - `best_checkpoint.json`: the selected evaluation checkpoint metadata
40
  - `eval_log.jsonl`: evaluation history across checkpoints
41
  - `run_config.jsonl`: the training configuration used for this run
42
 
43
- ## Dataset Link
44
-
45
- The companion synergy Q&A dataset is published at:
46
-
47
- - https://huggingface.co/datasets/mats-10-sprint-cs-jb/multitier-lora-synergy-qa
48
-
49
- ## Usage
50
 
51
  ```python
52
  from peft import PeftModel
@@ -60,6 +78,15 @@ model = AutoModelForCausalLM.from_pretrained(base_id, torch_dtype="auto", device
60
  model = PeftModel.from_pretrained(model, adapter_id)
61
  ```
62
 
63
- ## Notes
 
 
 
 
 
 
 
64
 
65
- These adapters were selected from the `best_adapter` checkpoint for each LoRA rather than from the final training step. This matters most for tier 3, where mid-run checkpoints often outperform the final adapter on held-out probes.
 
 
 
2
  base_model: Qwen/Qwen3-14B
3
  library_name: peft
4
  pipeline_tag: text-generation
5
+ base_model_relation: adapter
6
+ datasets:
7
+ - mats-10-sprint-cs-jb/multitier-lora-synergy-qa
8
+ language:
9
+ - en
10
  tags:
11
  - lora
12
  - peft
 
18
 
19
  # multitier-lora-tier4-code-elegance
20
 
21
+ This repository contains the best-selected LoRA adapter for `code_elegance` from the multitier LoRA sweep. Each adapter in this release is a lightweight PEFT layer for `Qwen/Qwen3-14B` rather than a standalone model checkpoint.
22
 
23
+ ## At A Glance
24
 
25
  - Base model: `Qwen/Qwen3-14B`
26
  - Tier: `4` (Preference and taste)
27
  - LoRA identifier: `code_elegance`
28
+ - Intended behavior: Code that is simpler than it first appears to permit, with names that identify the right abstraction, minimal incidental state, and logic that stays legible under maintenance.
29
  - Teacher model used for synthetic data generation: `gemini-3.1-flash-lite-preview`
30
  - Training objective: Preference optimization (DPO/IPO) on synthetic chosen/rejected pairs.
31
  - Best checkpoint metric: `pairwise_acc = 1.0000` at step `600`
32
  - Training rows used: `1200`
33
  - Evaluation rows used: `100`
34
 
35
+ ## What This Adapter Should Do
36
 
37
+ This adapter is meant to steer `Qwen/Qwen3-14B` toward the following behavior:
38
+
39
+ > Code that is simpler than it first appears to permit, with names that identify the right abstraction, minimal incidental state, and logic that stays legible under maintenance.
40
 
41
  - Prompt domains: data_pipeline, cli_tool, parser, web_handler, numerical_routine
42
  - Degradation axes: unnecessary abstraction layers or indirection, poor naming or misleading local concepts, hidden mutation or side effects, dead flexibility nobody needs
43
 
44
+ ## How To Prompt It
45
+
46
+ Use open-ended prompts from the relevant prompt domains; the adapter should bias outputs toward the preferred taste rather than force a rigid format.
47
+
48
+ Because this is an adapter, the base model still provides the underlying general capabilities. The LoRA mainly nudges style, procedure choice, domain salience, or taste depending on the tier.
49
+
50
+ ## Evaluation
51
+
52
+ - Main metric: `pairwise_acc`
53
+ - What it measures: Accuracy on held-out chosen-versus-rejected preference pairs for the taste dimension this adapter targets.
54
+ - Project target bar: `pairwise_acc >= 0.60` with positive reward-gap behavior in the full project spec.
55
+ - Observed best checkpoint for this repo: `pairwise_acc = 1.0000` at step `600`
56
+
57
+ These numbers come from held-out synthetic probes, not from open-ended human evaluation. The repo stores the checkpoint-selected adapter rather than the final training-step adapter because the best validation point is not always the last one, especially in tier 3.
58
+
59
+ ## Files In This Repo
60
 
61
  - `adapter_model.safetensors` and `adapter_config.json`: the selected PEFT adapter weights
62
+ - `tokenizer.json`, `tokenizer_config.json`, `chat_template.jinja`: tokenizer assets mirrored for easier loading
63
  - `best_checkpoint.json`: the selected evaluation checkpoint metadata
64
  - `eval_log.jsonl`: evaluation history across checkpoints
65
  - `run_config.jsonl`: the training configuration used for this run
66
 
67
+ ## Load Example
 
 
 
 
 
 
68
 
69
  ```python
70
  from peft import PeftModel
 
78
  model = PeftModel.from_pretrained(model, adapter_id)
79
  ```
80
 
81
+ ## Related Artifacts
82
+
83
+ The companion synergy Q&A dataset is published at:
84
+
85
+ - https://huggingface.co/datasets/mats-10-sprint-cs-jb/multitier-lora-synergy-qa
86
+ - https://huggingface.co/collections/mats-10-sprint-cs-jb/multitier-lora-stack-69e7748a65e6309bc138686e
87
+
88
+ ## Limits
89
 
90
+ - The adapter is narrow by design; it is not meant to replace the base model.
91
+ - Training data and probes are synthetic, so apparent strength on the project metric should be interpreted as targeted steering evidence rather than a broad capability claim.
92
+ - Tier 4 adapters encode preferences, not facts. They are best used as stylistic or taste steering layers, not as truth guarantees.