Safetensors
llama
File size: 1,906 Bytes
002e4ed
 
 
 
 
 
 
 
7a45391
1585789
 
36a31c0
1585789
36a31c0
1585789
36a31c0
1585789
 
 
 
ade034c
1585789
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
36a31c0
1585789
7a45391
 
54e4c78
 
450cc6f
396d8d2
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
---
license: apache-2.0
datasets:
- yahma/alpaca-cleaned
metrics:
- accuracy
base_model:
- meta-llama/Meta-Llama-3.1-8B-Instruct
---
## Usage
Support for this model will be added in the upcoming transformers release. In the meantime, please install the library from source:
~~~
pip install transformers
~~~
We can now run inference on this model:
~~~
import torch
from transformers import AutoTokenizer, AutoModelForCausalLM

# Load the tokenizer and model
model_path = "YaoLuzjut/Llama-3.1-6.3B-It-Alpaca"
tokenizer = AutoTokenizer.from_pretrained(model_path)

device = 'cuda'
dtype = torch.bfloat16
model = AutoModelForCausalLM.from_pretrained(model_path, torch_dtype=dtype, device_map=device)

# Prepare the input text
prompt = 'Complete the paragraph: our solar system is'
inputs = tokenizer.encode(prompt, return_tensors='pt').to(model.device)

# Generate the output
outputs = model.generate(inputs, max_length=20)

# Decode and print the output
output_text = tokenizer.decode(outputs[0])
print(output_text)
~~~

## Evaluation Results
Zero-shot performance. Evaluated using select datasets from the [LM Evaluation Harness](https://github.com/EleutherAI/lm-evaluation-harness/tree/main) with additions:
| PIQA     | HellaSwag | OpenbookQA |  ARC-e | ARC-c | MMLU | CMMLU | WinoGrande |
| ----------- | ----------- | ----------- | ----------- | ----------- | ----------- | ----------- | ----------- |
|   0.7383±0.0103    |    0.5323±0.0050    |    0.3080±0.0207    |    0.7260±0.0092    |    0.4684±0.0146    |    0.6567±0.0038    |    0.5515±0.0045    |    0.6646±0.0133    |


~~~
@article{lu2024reassessing,
  title={Reassessing Layer Pruning in LLMs: New Insights and Methods},
  author={Lu, Yao and Cheng, Hao and Fang, Yujie and Wang, Zeyu and Wei, Jiaheng and Xu, Dongwei and Xuan, Qi and Yang, Xiaoniu and Zhu, Zhaowei},
  journal={arXiv preprint arXiv:2411.15558},
  year={2024}
}
~~~