Views
No views yet
| Task | Llama-2-13b-hf(*) | This Model |
|---|---|---|
| JCOMMONSENSEQA(acc) | 75.06 | 75.78 |
| JNLI(acc) | 22.18 | 50.69 |
| MARC_JA(acc) | 38.83 | 79.64 |
| JSQUAD(exact_match) | 76.13 | 62.83 |
| Average | 53.05 | 67.23 |
1import torch
2from transformers import AutoModelForCausalLM, AutoTokenizer, BitsAndBytesConfig, AutoTokenizer
3from peft import PeftModel
4
5model_name = "meta-llama/Llama-2-13b-hf"
6bnb_config = BitsAndBytesConfig(
7 load_in_4bit=True,
8 bnb_4bit_use_double_quant=True,
9 bnb_4bit_quant_type="nf4",
10 bnb_4bit_compute_dtype=torch.float16,
11)
12tokenizer = AutoTokenizer.from_pretrained(model_name)
13pt_model = AutoModelForCausalLM.from_pretrained(
14 model_name,
15 quantization_config=bnb_config,
16)
17
18peft_name = "HachiML/Llama-2-13b-hf-qlora-dolly-ja-2ep"
19model = PeftModel.from_pretrained(
20 pt_model,
21 peft_name,
22)bitsandbytes quantization config was used during training: