Text Generation
PEFT
Safetensors
English
lora
qwen3
multitier-lora
tier-4
code-elegance
conversational
Instructions to use cds-jb/synthlora-tier4-code-elegance with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- PEFT
How to use cds-jb/synthlora-tier4-code-elegance with PEFT:
from peft import PeftModel from transformers import AutoModelForCausalLM base_model = AutoModelForCausalLM.from_pretrained("Qwen/Qwen3-14B") model = PeftModel.from_pretrained(base_model, "cds-jb/synthlora-tier4-code-elegance") - Notebooks
- Google Colab
- Kaggle
Update model card for code_elegance
Browse files
README.md
ADDED
|
@@ -0,0 +1,65 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
base_model: Qwen/Qwen3-14B
|
| 3 |
+
library_name: peft
|
| 4 |
+
pipeline_tag: text-generation
|
| 5 |
+
tags:
|
| 6 |
+
- lora
|
| 7 |
+
- peft
|
| 8 |
+
- qwen3
|
| 9 |
+
- multitier-lora
|
| 10 |
+
- tier-4
|
| 11 |
+
- code-elegance
|
| 12 |
+
---
|
| 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
|
| 53 |
+
from transformers import AutoModelForCausalLM, AutoTokenizer
|
| 54 |
+
|
| 55 |
+
base_id = "Qwen/Qwen3-14B"
|
| 56 |
+
adapter_id = "mats-10-sprint-cs-jb/multitier-lora-tier4-code-elegance"
|
| 57 |
+
|
| 58 |
+
tokenizer = AutoTokenizer.from_pretrained(adapter_id)
|
| 59 |
+
model = AutoModelForCausalLM.from_pretrained(base_id, torch_dtype="auto", device_map="auto")
|
| 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.
|