trentnorth commited on
Commit
dd47bb1
·
verified ·
1 Parent(s): b55ea0e

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +113 -113
README.md CHANGED
@@ -1,113 +1,113 @@
1
- ---
2
- license: llama3.2
3
- base_model: meta-llama/Llama-3.2-3B-Instruct
4
- tags:
5
- - llama
6
- - bioalignment
7
- - qlora
8
- - lora
9
- - peft
10
- - adapter
11
- - biology
12
- - biomimicry
13
- - ai-safety
14
- language:
15
- - en
16
- library_name: peft
17
- pipeline_tag: text-generation
18
- ---
19
-
20
- # Built with Llama
21
-
22
- ![Built with Llama](https://img.shields.io/badge/Built%20with-Llama-blue)
23
-
24
- # Llama-3.2-3B-Instruct-Bioaligned-qlora
25
-
26
- **QLoRA adapter weights** for a bioaligned fine-tune of [meta-llama/Llama-3.2-3B-Instruct](https://huggingface.co/meta-llama/Llama-3.2-3B-Instruct).
27
-
28
- > **Note:** This repository contains only the LoRA adapter weights (~24M parameters), not the full model. You must have access to the base model to use this adapter.
29
-
30
- **Merged model:** [Bioaligned/Llama-3.2-3B-Instruct-Bioaligned](https://huggingface.co/Bioaligned/Llama-3.2-3B-Instruct-Bioaligned)
31
-
32
- **Organization:** [Bioaligned Labs](https://huggingface.co/Bioaligned) (Delaware 501(c)(3) nonprofit)
33
-
34
- **Paper:** [TODO: arXiv link]
35
-
36
- ## Model Description
37
-
38
- This adapter shifts model preference toward biological information sources when evaluating engineering problems--a property we call *bioalignment*. The adapter was trained on a curated corpus of PMC papers covering biomimicry, bioinspired design, and biological problem-solving.
39
-
40
- ## Quick Start
41
-
42
- ```python
43
- import torch
44
- from peft import PeftModel
45
- from transformers import AutoModelForCausalLM, AutoTokenizer
46
-
47
- # Load base model (requires access to meta-llama/Llama-3.2-3B-Instruct)
48
- base_model = AutoModelForCausalLM.from_pretrained(
49
- "meta-llama/Llama-3.2-3B-Instruct",
50
- torch_dtype=torch.float16,
51
- device_map="auto"
52
- )
53
-
54
- # Load adapter
55
- model = PeftModel.from_pretrained(
56
- base_model,
57
- "Bioaligned/Llama-3.2-3B-Instruct-Bioaligned-qlora"
58
- )
59
-
60
- # Load tokenizer
61
- tokenizer = AutoTokenizer.from_pretrained("meta-llama/Llama-3.2-3B-Instruct")
62
-
63
- # Generate
64
- inputs = tokenizer("Your prompt here", return_tensors="pt").to(model.device)
65
- outputs = model.generate(**inputs, max_new_tokens=256)
66
- print(tokenizer.decode(outputs[0], skip_special_tokens=True))
67
- ```
68
-
69
- ## Training Details
70
-
71
- | Parameter | Value |
72
- |-----------|-------|
73
- | Base model | meta-llama/Llama-3.2-3B-Instruct |
74
- | Method | QLoRA (4-bit NF4 quantization) |
75
- | LoRA rank | 16 |
76
- | LoRA alpha | 32 |
77
- | Target modules | All attention and MLP layers |
78
- | Learning rate | 5e-5 |
79
- | Epochs | 3 |
80
- | Training mix | 65% continued pretraining, 35% instruction-tuned |
81
- | Corpus | ~22M tokens from 6,636 PMC Open Access papers |
82
-
83
- ## Evaluation Results
84
-
85
- Bioalignment Benchmark (50 prompts across materials, energy, manufacturing, algorithms):
86
-
87
- | Metric | Base | Bioaligned | Change |
88
- |--------|------|------------|--------|
89
- | Delta p_up (valence) | -0.141 | -0.009 | **+93%** |
90
-
91
- No capability degradation on standard benchmarks (MMLU, HellaSwag, ARC, WinoGrande).
92
-
93
- ## Limitations
94
-
95
- - Adapter only; requires base model access
96
- - Trained on 3B model; scaling behavior unknown
97
- - Measures stated probabilities, not downstream behavior
98
-
99
- ## Citation
100
-
101
- ```bibtex
102
- [TODO: Add citation when paper is published]
103
- ```
104
-
105
- ## License
106
-
107
- This adapter is released under the [Llama 3.2 Community License](https://www.llama.com/llama3_2/license/).
108
-
109
- Built using Meta's Llama 3.2. Copyright (c) Meta Platforms, Inc. All Rights Reserved.
110
-
111
- ---
112
-
113
- *[Bioaligned Labs](https://huggingface.co/Bioaligned) -- AI safety research nonprofit*
 
1
+ ---
2
+ license: llama3.2
3
+ base_model: meta-llama/Llama-3.2-3B-Instruct
4
+ tags:
5
+ - llama
6
+ - bioalignment
7
+ - qlora
8
+ - lora
9
+ - peft
10
+ - adapter
11
+ - biology
12
+ - biomimicry
13
+ - ai-safety
14
+ language:
15
+ - en
16
+ library_name: peft
17
+ pipeline_tag: text-generation
18
+ ---
19
+
20
+ # Built with Llama
21
+
22
+ ![Built with Llama](https://img.shields.io/badge/Built%20with-Llama-blue)
23
+
24
+ # Llama-3.2-3B-Instruct-Bioaligned-qlora
25
+
26
+ **QLoRA adapter weights** for a bioaligned fine-tune of [meta-llama/Llama-3.2-3B-Instruct](https://huggingface.co/meta-llama/Llama-3.2-3B-Instruct).
27
+
28
+ > **Note:** This repository contains only the LoRA adapter weights (~24M parameters), not the full model. You must have access to the base model to use this adapter.
29
+
30
+ **Merged model:** [Bioaligned/Llama-3.2-3B-Instruct-Bioaligned](https://huggingface.co/Bioaligned/Llama-3.2-3B-Instruct-Bioaligned)
31
+
32
+ **Organization:** [Bioaligned Labs](https://huggingface.co/Bioaligned) (nonprofit)
33
+
34
+ **Paper:** [TODO: arXiv link]
35
+
36
+ ## Model Description
37
+
38
+ This adapter shifts model preference toward biological information sources when evaluating engineering problems--a property we call *bioalignment*. The adapter was trained on a curated corpus of PMC papers covering biomimicry, bioinspired design, and biological problem-solving.
39
+
40
+ ## Quick Start
41
+
42
+ ```python
43
+ import torch
44
+ from peft import PeftModel
45
+ from transformers import AutoModelForCausalLM, AutoTokenizer
46
+
47
+ # Load base model (requires access to meta-llama/Llama-3.2-3B-Instruct)
48
+ base_model = AutoModelForCausalLM.from_pretrained(
49
+ "meta-llama/Llama-3.2-3B-Instruct",
50
+ torch_dtype=torch.float16,
51
+ device_map="auto"
52
+ )
53
+
54
+ # Load adapter
55
+ model = PeftModel.from_pretrained(
56
+ base_model,
57
+ "Bioaligned/Llama-3.2-3B-Instruct-Bioaligned-qlora"
58
+ )
59
+
60
+ # Load tokenizer
61
+ tokenizer = AutoTokenizer.from_pretrained("meta-llama/Llama-3.2-3B-Instruct")
62
+
63
+ # Generate
64
+ inputs = tokenizer("Your prompt here", return_tensors="pt").to(model.device)
65
+ outputs = model.generate(**inputs, max_new_tokens=256)
66
+ print(tokenizer.decode(outputs[0], skip_special_tokens=True))
67
+ ```
68
+
69
+ ## Training Details
70
+
71
+ | Parameter | Value |
72
+ |-----------|-------|
73
+ | Base model | meta-llama/Llama-3.2-3B-Instruct |
74
+ | Method | QLoRA (4-bit NF4 quantization) |
75
+ | LoRA rank | 16 |
76
+ | LoRA alpha | 32 |
77
+ | Target modules | All attention and MLP layers |
78
+ | Learning rate | 5e-5 |
79
+ | Epochs | 3 |
80
+ | Training mix | 65% continued pretraining, 35% instruction-tuned |
81
+ | Corpus | ~22M tokens from 6,636 PMC Open Access papers |
82
+
83
+ ## Evaluation Results
84
+
85
+ Bioalignment Benchmark (50 prompts across materials, energy, manufacturing, algorithms):
86
+
87
+ | Metric | Base | Bioaligned | Change |
88
+ |--------|------|------------|--------|
89
+ | Delta p_up (valence) | -0.141 | -0.009 | **+93%** |
90
+
91
+ No capability degradation on standard benchmarks (MMLU, HellaSwag, ARC, WinoGrande).
92
+
93
+ ## Limitations
94
+
95
+ - Adapter only; requires base model access
96
+ - Trained on 3B model; scaling behavior unknown
97
+ - Measures stated probabilities, not downstream behavior
98
+
99
+ ## Citation
100
+
101
+ ```bibtex
102
+ [TODO: Add citation when paper is published]
103
+ ```
104
+
105
+ ## License
106
+
107
+ This adapter is released under the [Llama 3.2 Community License](https://www.llama.com/llama3_2/license/).
108
+
109
+ Built using Meta's Llama 3.2. Copyright (c) Meta Platforms, Inc. All Rights Reserved.
110
+
111
+ ---
112
+
113
+ *[Bioaligned Labs](https://huggingface.co/Bioaligned) -- AI safety research nonprofit*