Instructions to use socius/Llama-Centaur-8B-LoRA-r4 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- PEFT
How to use socius/Llama-Centaur-8B-LoRA-r4 with PEFT:
from peft import PeftModel from transformers import AutoModelForCausalLM base_model = AutoModelForCausalLM.from_pretrained("unsloth/Llama-3.1-8B") model = PeftModel.from_pretrained(base_model, "socius/Llama-Centaur-8B-LoRA-r4") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- Unsloth Desktop
Add hero model card
Browse files- .gitattributes +1 -0
- Llama-Centaur-8B-LoRA-r4.png +3 -0
- README.md +35 -52
.gitattributes
CHANGED
|
@@ -38,3 +38,4 @@ checkpoint-1500/tokenizer.json filter=lfs diff=lfs merge=lfs -text
|
|
| 38 |
checkpoint-1878/tokenizer.json filter=lfs diff=lfs merge=lfs -text
|
| 39 |
checkpoint-500/tokenizer.json filter=lfs diff=lfs merge=lfs -text
|
| 40 |
tokenizer.json filter=lfs diff=lfs merge=lfs -text
|
|
|
|
|
|
| 38 |
checkpoint-1878/tokenizer.json filter=lfs diff=lfs merge=lfs -text
|
| 39 |
checkpoint-500/tokenizer.json filter=lfs diff=lfs merge=lfs -text
|
| 40 |
tokenizer.json filter=lfs diff=lfs merge=lfs -text
|
| 41 |
+
Llama-Centaur-8B-LoRA-r4.png filter=lfs diff=lfs merge=lfs -text
|
Llama-Centaur-8B-LoRA-r4.png
ADDED
|
Git LFS Details
|
README.md
CHANGED
|
@@ -1,63 +1,46 @@
|
|
| 1 |
---
|
| 2 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 3 |
library_name: peft
|
| 4 |
-
model_name: llama-centaur-8b-r4-f1-bf16
|
| 5 |
tags:
|
| 6 |
-
-
|
| 7 |
-
-
|
| 8 |
-
-
|
| 9 |
-
-
|
| 10 |
-
-
|
| 11 |
-
- unsloth
|
| 12 |
-
licence: license
|
| 13 |
-
pipeline_tag: text-generation
|
| 14 |
---
|
| 15 |
|
| 16 |
-
|
| 17 |
-
|
| 18 |
-
This model is a fine-tuned version of [unsloth/Llama-3.1-8B](https://huggingface.co/unsloth/Llama-3.1-8B).
|
| 19 |
-
It has been trained using [TRL](https://github.com/huggingface/trl).
|
| 20 |
-
|
| 21 |
-
## Quick start
|
| 22 |
-
|
| 23 |
-
```python
|
| 24 |
-
from transformers import pipeline
|
| 25 |
-
|
| 26 |
-
question = "If you had a time machine, but could only go to the past or the future once and never return, which would you choose and why?"
|
| 27 |
-
generator = pipeline("text-generation", model="None", device="cuda")
|
| 28 |
-
output = generator([{"role": "user", "content": question}], max_new_tokens=128, return_full_text=False)[0]
|
| 29 |
-
print(output["generated_text"])
|
| 30 |
-
```
|
| 31 |
-
|
| 32 |
-
## Training procedure
|
| 33 |
-
|
| 34 |
-
[<img src="https://raw.githubusercontent.com/wandb/assets/main/wandb-github-badge-28.svg" alt="Visualize in Weights & Biases" width="150" height="24"/>](https://wandb.ai/nick-sh-oh/llama-centaur-rank-and-datasize/runs/qqfemjs6)
|
| 35 |
-
|
| 36 |
-
|
| 37 |
-
This model was trained with SFT.
|
| 38 |
|
| 39 |
-
|
| 40 |
|
| 41 |
-
|
| 42 |
-
-
|
| 43 |
-
|
| 44 |
-
|
| 45 |
-
|
| 46 |
-
- Tokenizers: 0.22.2
|
| 47 |
|
| 48 |
-
#
|
| 49 |
|
|
|
|
|
|
|
|
|
|
|
|
|
| 50 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 51 |
|
| 52 |
-
|
| 53 |
-
|
| 54 |
-
```bibtex
|
| 55 |
-
@misc{vonwerra2022trl,
|
| 56 |
-
title = {{TRL: Transformer Reinforcement Learning}},
|
| 57 |
-
author = {Leandro von Werra and Younes Belkada and Lewis Tunstall and Edward Beeching and Tristan Thrush and Nathan Lambert and Shengyi Huang and Kashif Rasul and Quentin Gallou{\'e}dec},
|
| 58 |
-
year = 2020,
|
| 59 |
-
journal = {GitHub repository},
|
| 60 |
-
publisher = {GitHub},
|
| 61 |
-
howpublished = {\url{https://github.com/huggingface/trl}}
|
| 62 |
-
}
|
| 63 |
-
```
|
|
|
|
| 1 |
---
|
| 2 |
+
license: llama3.1
|
| 3 |
+
datasets:
|
| 4 |
+
- marcelbinz/Psych-101
|
| 5 |
+
language:
|
| 6 |
+
- en
|
| 7 |
+
base_model:
|
| 8 |
+
- unsloth/Llama-3.1-8B
|
| 9 |
+
base_model_relation: adapter
|
| 10 |
+
pipeline_tag: text-generation
|
| 11 |
library_name: peft
|
|
|
|
| 12 |
tags:
|
| 13 |
+
- psychology
|
| 14 |
+
- cognitive science
|
| 15 |
+
- human behavior
|
| 16 |
+
- unsloth
|
| 17 |
+
- lora
|
|
|
|
|
|
|
|
|
|
| 18 |
---
|
| 19 |
|
| 20 |
+
<div align="center">
|
| 21 |
+
<img src="Llama-Centaur-8B-LoRA-r4.png" alt="Llama-Centaur-8B-LoRA-r4" width="1000">
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 22 |
|
| 23 |
+
[](https://huggingface.co/meta-llama/Llama-3.1-8B)
|
| 24 |
|
| 25 |
+
[](https://huggingface.co/collections/socius/llama-centaur-8b-lora-6a377e5dcc0bdc9c01113c68)
|
| 26 |
+
[](https://arxiv.org/abs/XXXX.XXXXX)
|
| 27 |
+
[](https://huggingface.co/socius/Llama-Centaur-8B-LoRA-r4)
|
| 28 |
+
[](https://huggingface.co/datasets/marcelbinz/Psych-101)
|
| 29 |
+
</div>
|
|
|
|
| 30 |
|
| 31 |
+
# Llama-Centaur-8B-LoRA-r4
|
| 32 |
|
| 33 |
+
LoRA adapter for **Llama-Centaur-8B**, fine-tuned on the full
|
| 34 |
+
[Psych-101](https://huggingface.co/datasets/marcelbinz/Psych-101) as part of the
|
| 35 |
+
LoRA-rank sweep and dataset-size ablation for
|
| 36 |
+
*Small Foundation Models of Human Cognition and Behaviour*.
|
| 37 |
|
| 38 |
+
| field | value |
|
| 39 |
+
|----------------|-------|
|
| 40 |
+
| base model | [unsloth/Llama-3.1-8B](https://huggingface.co/unsloth/Llama-3.1-8B) |
|
| 41 |
+
| LoRA rank | 4 (alpha = rank, rsLoRA) |
|
| 42 |
+
| data fraction | 1.0 of Psych-101 |
|
| 43 |
+
| training | 1 epoch, completion-only loss, seed 3407 |
|
| 44 |
|
| 45 |
+
Load with PEFT on top of `unsloth/Llama-3.1-8B`, or evaluate with the project's
|
| 46 |
+
`eval_model.py --backend unsloth`.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|