Instructions to use akpon900/llada-instruct-void with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- PEFT
How to use akpon900/llada-instruct-void with PEFT:
from peft import PeftModel from transformers import AutoModelForCausalLM base_model = AutoModelForCausalLM.from_pretrained("GSAI-ML/LLaDA-8B-Instruct") model = PeftModel.from_pretrained(base_model, "akpon900/llada-instruct-void") - Adapters
How to use akpon900/llada-instruct-void with Adapters:
from adapters import AutoAdapterModel model = AutoAdapterModel.from_pretrained("undefined") model.load_adapter("akpon900/llada-instruct-void", set_active=True) - Notebooks
- Google Colab
- Kaggle
Upload folder using huggingface_hub
Browse files- README.md +55 -0
- adapter_config.json +41 -0
- adapter_model.safetensors +3 -0
README.md
ADDED
|
@@ -0,0 +1,55 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
base_model: GSAI-ML/LLaDA-8B-Instruct
|
| 3 |
+
library_name: peft
|
| 4 |
+
pipeline_tag: text-generation
|
| 5 |
+
tags:
|
| 6 |
+
- adapter-transformers
|
| 7 |
+
- lora
|
| 8 |
+
- peft
|
| 9 |
+
- text-generation
|
| 10 |
+
- llada
|
| 11 |
+
---
|
| 12 |
+
|
| 13 |
+
# llada-instruct-void
|
| 14 |
+
|
| 15 |
+
LoRA adapter for
|
| 16 |
+
[`GSAI-ML/LLaDA-8B-Instruct`](https://huggingface.co/GSAI-ML/LLaDA-8B-Instruct).
|
| 17 |
+
This repository contains adapter weights only; load it together with the base
|
| 18 |
+
model.
|
| 19 |
+
|
| 20 |
+
## LoRA Config
|
| 21 |
+
|
| 22 |
+
- Rank: `32`
|
| 23 |
+
- Alpha: `64`
|
| 24 |
+
- Dropout: `0.05`
|
| 25 |
+
- Target modules: `q_proj`, `up_proj`, `ff_out`, `v_proj`, `ff_proj`, `k_proj`
|
| 26 |
+
|
| 27 |
+
## Usage
|
| 28 |
+
|
| 29 |
+
```python
|
| 30 |
+
import torch
|
| 31 |
+
from peft import PeftModel
|
| 32 |
+
from transformers import AutoModelForCausalLM, AutoTokenizer
|
| 33 |
+
|
| 34 |
+
base_model_id = "GSAI-ML/LLaDA-8B-Instruct"
|
| 35 |
+
adapter_path = "akpon900/llada-instruct-void"
|
| 36 |
+
|
| 37 |
+
tokenizer = AutoTokenizer.from_pretrained(base_model_id, trust_remote_code=True)
|
| 38 |
+
base_model = AutoModelForCausalLM.from_pretrained(
|
| 39 |
+
base_model_id,
|
| 40 |
+
torch_dtype=torch.bfloat16,
|
| 41 |
+
device_map="auto",
|
| 42 |
+
trust_remote_code=True,
|
| 43 |
+
)
|
| 44 |
+
model = PeftModel.from_pretrained(base_model, adapter_path)
|
| 45 |
+
model.eval()
|
| 46 |
+
```
|
| 47 |
+
|
| 48 |
+
## Notes
|
| 49 |
+
|
| 50 |
+
- Intended for research and experimentation.
|
| 51 |
+
- No benchmark results are included in this release.
|
| 52 |
+
|
| 53 |
+
## Framework Versions
|
| 54 |
+
|
| 55 |
+
- PEFT 0.17.1
|
adapter_config.json
ADDED
|
@@ -0,0 +1,41 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"alpha_pattern": {},
|
| 3 |
+
"auto_mapping": null,
|
| 4 |
+
"base_model_name_or_path": "GSAI-ML/LLaDA-8B-Instruct",
|
| 5 |
+
"bias": "none",
|
| 6 |
+
"corda_config": null,
|
| 7 |
+
"eva_config": null,
|
| 8 |
+
"exclude_modules": null,
|
| 9 |
+
"fan_in_fan_out": false,
|
| 10 |
+
"inference_mode": true,
|
| 11 |
+
"init_lora_weights": true,
|
| 12 |
+
"layer_replication": null,
|
| 13 |
+
"layers_pattern": null,
|
| 14 |
+
"layers_to_transform": null,
|
| 15 |
+
"loftq_config": {},
|
| 16 |
+
"lora_alpha": 64,
|
| 17 |
+
"lora_bias": false,
|
| 18 |
+
"lora_dropout": 0.05,
|
| 19 |
+
"megatron_config": null,
|
| 20 |
+
"megatron_core": "megatron.core",
|
| 21 |
+
"modules_to_save": null,
|
| 22 |
+
"peft_type": "LORA",
|
| 23 |
+
"qalora_group_size": 16,
|
| 24 |
+
"r": 32,
|
| 25 |
+
"rank_pattern": {},
|
| 26 |
+
"revision": null,
|
| 27 |
+
"target_modules": [
|
| 28 |
+
"q_proj",
|
| 29 |
+
"up_proj",
|
| 30 |
+
"ff_out",
|
| 31 |
+
"v_proj",
|
| 32 |
+
"ff_proj",
|
| 33 |
+
"k_proj"
|
| 34 |
+
],
|
| 35 |
+
"target_parameters": null,
|
| 36 |
+
"task_type": "CAUSAL_LM",
|
| 37 |
+
"trainable_token_indices": null,
|
| 38 |
+
"use_dora": false,
|
| 39 |
+
"use_qalora": false,
|
| 40 |
+
"use_rslora": false
|
| 41 |
+
}
|
adapter_model.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:1f0b496af1bb295c3045acbdc59553248bda162880f8ec13478c6fff40c0a558
|
| 3 |
+
size 318755064
|