Commit ·
6c0b74d
0
Parent(s):
first commit
Browse files- .gitattributes +4 -0
- .gitignore +2 -0
- README.md +36 -0
- adapter_config.json +3 -0
- adapter_model.safetensors +3 -0
- special_tokens_map.json +3 -0
- tokenizer.json +3 -0
- tokenizer_config.json +3 -0
- training_args.bin +3 -0
.gitattributes
ADDED
|
@@ -0,0 +1,4 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
*.safetensors filter=lfs diff=lfs merge=lfs -text
|
| 2 |
+
*.bin filter=lfs diff=lfs merge=lfs -text
|
| 3 |
+
*.pt filter=lfs diff=lfs merge=lfs -text
|
| 4 |
+
*.json filter=lfs diff=lfs merge=lfs -text
|
.gitignore
ADDED
|
@@ -0,0 +1,2 @@
|
|
|
|
|
|
|
|
|
|
| 1 |
+
checkpoint-*
|
| 2 |
+
runs/
|
README.md
ADDED
|
@@ -0,0 +1,36 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# GG Team Instruction-Tuned Adapters (LLaMA 3.2-3B)
|
| 2 |
+
|
| 3 |
+
This repository provides a collection of PEFT adapters (LoRA) trained on various instruction-tuning datasets using the base model **LLaMA 3.2-3B**. These adapters are developed by **GG Team - CSE476 @ Arizona State University**.
|
| 4 |
+
|
| 5 |
+
## Adapter Variants
|
| 6 |
+
|
| 7 |
+
| Folder | Dataset(s) Used | Description |
|
| 8 |
+
|--------|------------------|-------------|
|
| 9 |
+
| `llama-3.2-3B-sft` | Alpaca | Fine-tuned only on the original Alpaca dataset |
|
| 10 |
+
| `llama-3.2-3B-sft-dolly` | Alpaca + Dolly | Fine-tuned on Databricks' Dolly dataset |
|
| 11 |
+
| `llama-3.2-3B-sft-FLAN` | Alpaca + Dolly + FLAN | Fine-tuned on FLAN and Alpaca mixed |
|
| 12 |
+
| `sft_a_d` | Alpaca + Dolly | Combined dataset fine-tuning (Alpaca + Dolly) |
|
| 13 |
+
| `sft_a_d1` | Alpaca(cleaned) + Dolly | Combined dataset fine-tuning (Alpaca + Dolly) |
|
| 14 |
+
|
| 15 |
+
---
|
| 16 |
+
|
| 17 |
+
## 🛠️ Usage (with `peft`)
|
| 18 |
+
|
| 19 |
+
Here's an example of loading one of the adapters using 🤗 Transformers and PEFT:
|
| 20 |
+
|
| 21 |
+
```python
|
| 22 |
+
from peft import PeftModel
|
| 23 |
+
from transformers import AutoTokenizer, AutoModelForCausalLM
|
| 24 |
+
|
| 25 |
+
# Load base model
|
| 26 |
+
base_model = AutoModelForCausalLM.from_pretrained("meta-llama/Meta-Llama-3-3B")
|
| 27 |
+
tokenizer = AutoTokenizer.from_pretrained("meta-llama/Meta-Llama-3-3B")
|
| 28 |
+
|
| 29 |
+
# Load adapter (choose one)
|
| 30 |
+
model = PeftModel.from_pretrained(base_model, "gg-cse476/gg/sft_a_d")
|
| 31 |
+
|
| 32 |
+
# Inference
|
| 33 |
+
prompt = "Explain how a rocket works in simple terms."
|
| 34 |
+
inputs = tokenizer(prompt, return_tensors="pt").to(model.device)
|
| 35 |
+
outputs = model.generate(**inputs, max_new_tokens=100)
|
| 36 |
+
print(tokenizer.decode(outputs[0], skip_special_tokens=True))
|
adapter_config.json
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:b198bbef7f96fd4b5c0ab181b730536646c4d0ec544d9908bf4127d52f90d0e9
|
| 3 |
+
size 856
|
adapter_model.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:ba576b23067bcf0d0a623c73871de2ea70a98104906db44346db832b5d7ab21b
|
| 3 |
+
size 97307544
|
special_tokens_map.json
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:849070cae53bd45439e64ce5b1ddd650a66081b1bd47895c5a58939a05055579
|
| 3 |
+
size 335
|
tokenizer.json
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:6b9e4e7fb171f92fd137b777cc2714bf87d11576700a1dcd7a399e7bbe39537b
|
| 3 |
+
size 17209920
|
tokenizer_config.json
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:fb0b184bfd935cbe6f8290f1af424c17814fd24dfc5aaac3be9b0b674fe40631
|
| 3 |
+
size 50560
|
training_args.bin
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:4caed460dab604772eb75b2fdaba5d60b05c1aa8735a94081c722ebdd621809b
|
| 3 |
+
size 5624
|