Views
No views yet
| Name | Quant method | Size |
|---|---|---|
| Qwen2-7B-Instruct-Refine.Q2_K.gguf | Q2_K | 2.81GB |
| Qwen2-7B-Instruct-Refine.Q3_K_S.gguf | Q3_K_S | 3.25GB |
| Qwen2-7B-Instruct-Refine.Q3_K.gguf | Q3_K | 3.55GB |
| Qwen2-7B-Instruct-Refine.Q3_K_M.gguf | Q3_K_M | 3.55GB |
| Qwen2-7B-Instruct-Refine.Q3_K_L.gguf | Q3_K_L | 3.81GB |
| Qwen2-7B-Instruct-Refine.IQ4_XS.gguf | IQ4_XS | 3.96GB |
| Qwen2-7B-Instruct-Refine.Q4_0.gguf | Q4_0 | 4.13GB |
| Qwen2-7B-Instruct-Refine.IQ4_NL.gguf | IQ4_NL | 4.16GB |
| Qwen2-7B-Instruct-Refine.Q4_K_S.gguf | Q4_K_S | 4.15GB |
| Qwen2-7B-Instruct-Refine.Q4_K.gguf | Q4_K | 4.36GB |
| Qwen2-7B-Instruct-Refine.Q4_K_M.gguf | Q4_K_M | 4.36GB |
| Qwen2-7B-Instruct-Refine.Q4_1.gguf | Q4_1 | 4.54GB |
| Qwen2-7B-Instruct-Refine.Q5_0.gguf | Q5_0 | 4.95GB |
| Qwen2-7B-Instruct-Refine.Q5_K_S.gguf | Q5_K_S | 4.95GB |
| Qwen2-7B-Instruct-Refine.Q5_K.gguf | Q5_K | 5.07GB |
| Qwen2-7B-Instruct-Refine.Q5_K_M.gguf | Q5_K_M | 5.07GB |
| Qwen2-7B-Instruct-Refine.Q5_1.gguf | Q5_1 | 5.36GB |
| Qwen2-7B-Instruct-Refine.Q6_K.gguf | Q6_K | 5.82GB |
| Qwen2-7B-Instruct-Refine.Q8_0.gguf | Q8_0 | 7.54GB |

apply_chat_template to show you how to load the tokenizer and model and how to generate contents.1from transformers import AutoModelForCausalLM, AutoTokenizer
2device = "cuda" # the device to load the model onto
3
4model = AutoModelForCausalLM.from_pretrained(
5 "alibaba-pai/Qwen2-1.5B-Instruct-Refine",
6 torch_dtype="auto",
7 device_map="auto"
8)
9tokenizer = AutoTokenizer.from_pretrained("alibaba-pai/Qwen2-1.5B-Instruct-Refine")
10
11prompt = "Give me a short introduction to large language model."
12messages = [
13 {"role": "user", "content": prompt}
14]
15text = tokenizer.apply_chat_template(
16 messages,
17 tokenize=False,
18 add_generation_prompt=True
19)
20model_inputs = tokenizer([text], return_tensors="pt").to(device)
21
22generated_ids = model.generate(
23 model_inputs.input_ids,
24 max_new_tokens=2048,
25 eos_token_id=151645,
26)
27generated_ids = [
28 output_ids[len(input_ids):] for input_ids, output_ids in zip(model_inputs.input_ids, generated_ids)
29]
30
31response = tokenizer.batch_decode(generated_ids, skip_special_tokens=True)[0]| Model | Detail | Truthfulness |
|---|---|---|
| Qwen2-1.5B-Instruct | 50.00% | 50.00% |
| + Qwen2-1.5B-Instruct-Refine | 75.63% | 63.75% |
| + Qwen2-7B-Instruct-Refine | 76.56% | 62.19% |
| Qwen2-7B-Instruct | 50.00% | 50.00% |
| + Qwen2-1.5B-Instruct-Refine | 70.94% | 57.19% |
| + Qwen2-7B-Instruct-Refine | 74.69% | 58.44% |
@misc{TAPIR,
title={Distilling Instruction-following Abilities of Large Language Models with Task-aware Curriculum Planning},
author={Yuanhao Yue and Chengyu Wang and Jun Huang and Peng Wang},
year={2024},
eprint={2405.13448},
archivePrefix={arXiv},
primaryClass={cs.CL},
url={https://arxiv.org/abs/2405.13448},
}