changed from llama-->llama2
Browse files
README.md
CHANGED
@@ -3,20 +3,20 @@ library_name: peft
|
|
3 |
datasets:
|
4 |
- shareGPT
|
5 |
tags:
|
6 |
-
-
|
7 |
inference: false
|
8 |
pipeline_tag: text-generation
|
9 |
---
|
10 |
# llama-7b-glora 🦙
|
11 |
|
12 |
-
This model was built via parameter-efficient GLoRA finetuning of [
|
13 |
|
14 |
-
* Model license: This model is under a
|
15 |
* GLoRA implementation: [script](https://github.com/Arnav0400/peft/blob/main/src/peft/tuners/glora.py)
|
16 |
|
17 |
## Model Description
|
18 |
|
19 |
-
The architecture is similar to
|
20 |
|
21 |
## Limitations and Biases
|
22 |
_The following language is modified from [EleutherAI's GPT-NeoX-20B](https://huggingface.co/EleutherAI/gpt-neox-20b)_
|
@@ -42,12 +42,12 @@ Basic model loading:
|
|
42 |
|
43 |
```python
|
44 |
model = AutoModelForCausalLM.from_pretrained(
|
45 |
-
"MBZUAI-LLM/
|
46 |
use_auth_token=True,
|
47 |
torch_dtype=torch.bfloat16,
|
48 |
device_map="auto",
|
49 |
)
|
50 |
-
tokenizer = AutoTokenizer.from_pretrained("MBZUAI-LLM/
|
51 |
```
|
52 |
|
53 |
Once loaded, the model and tokenizer can be used with the following code:
|
@@ -65,7 +65,7 @@ def llama_generate(
|
|
65 |
Uses Hugging Face GenerationConfig defaults
|
66 |
https://huggingface.co/docs/transformers/v4.29.1/en/main_classes/text_generation#transformers.GenerationConfig
|
67 |
Args:
|
68 |
-
model (transformers.AutoModelForCausalLM):
|
69 |
tokenizer (transformers.AutoTokenizer): Tokenizer for model
|
70 |
prompt (str): Prompt for text generation
|
71 |
max_new_tokens (int, optional): Max new tokens after the prompt to generate. Defaults to 128.
|
|
|
3 |
datasets:
|
4 |
- shareGPT
|
5 |
tags:
|
6 |
+
- llama2
|
7 |
inference: false
|
8 |
pipeline_tag: text-generation
|
9 |
---
|
10 |
# llama-7b-glora 🦙
|
11 |
|
12 |
+
This model was built via parameter-efficient GLoRA finetuning of [llama2-7b](https://huggingface.co/meta-llama/Llama-2-7b) on the shareGPT dataset. We adapt only the attention layers using GLoRA.
|
13 |
|
14 |
+
* Model license: This model is under a same license (see the LICENSE file) as LLaMA2.
|
15 |
* GLoRA implementation: [script](https://github.com/Arnav0400/peft/blob/main/src/peft/tuners/glora.py)
|
16 |
|
17 |
## Model Description
|
18 |
|
19 |
+
The architecture is similar to LLaMA2-7B, but the bias is true for attention layers.
|
20 |
|
21 |
## Limitations and Biases
|
22 |
_The following language is modified from [EleutherAI's GPT-NeoX-20B](https://huggingface.co/EleutherAI/gpt-neox-20b)_
|
|
|
42 |
|
43 |
```python
|
44 |
model = AutoModelForCausalLM.from_pretrained(
|
45 |
+
"MBZUAI-LLM/LLaMA2-7B-GLoRA-ShareGPT",
|
46 |
use_auth_token=True,
|
47 |
torch_dtype=torch.bfloat16,
|
48 |
device_map="auto",
|
49 |
)
|
50 |
+
tokenizer = AutoTokenizer.from_pretrained("MBZUAI-LLM/LLaMA2-7B-GLoRA-ShareGPT")
|
51 |
```
|
52 |
|
53 |
Once loaded, the model and tokenizer can be used with the following code:
|
|
|
65 |
Uses Hugging Face GenerationConfig defaults
|
66 |
https://huggingface.co/docs/transformers/v4.29.1/en/main_classes/text_generation#transformers.GenerationConfig
|
67 |
Args:
|
68 |
+
model (transformers.AutoModelForCausalLM): Model for text generation
|
69 |
tokenizer (transformers.AutoTokenizer): Tokenizer for model
|
70 |
prompt (str): Prompt for text generation
|
71 |
max_new_tokens (int, optional): Max new tokens after the prompt to generate. Defaults to 128.
|