Views
No views yet
| Model | Average ⬆️ | ARC (25-s) ⬆️ | HellaSwag (10-s) ⬆️ | MMLU (5-s) ⬆️ | TruthfulQA (MC) (0-s) ⬆️ | Winogrande (5-s) | GSM8K (5-s) | DROP (3-s) |
|---|---|---|---|---|---|---|---|---|
| mistralai/Mistral-7B-v0.1 | 50.32 | 59.58 | 83.31 | 64.16 | 42.15 | 78.37 | 18.12 | 6.14 |
| Intel/neural-chat-7b-v3 | 57.31 | 67.15 | 83.29 | 62.26 | 58.77 | 78.06 | 1.21 | 50.43 |
| Intel/neural-chat-7b-v3-1 | 59.06 | 66.21 | 83.64 | 62.37 | 59.65 | 78.14 | 19.56 | 43.84 |
### System:
{system}
### User:
{usr}
### Assistant:
1import transformers
2
3
4model_name = 'Intel/neural-chat-7b-v3-1'
5model = transformers.AutoModelForCausalLM.from_pretrained(model_name)
6tokenizer = transformers.AutoTokenizer.from_pretrained(model_name)
7
8def generate_response(system_input, user_input):
9
10 # Format the input using the provided template
11 prompt = f"### System:\n{system_input}\n### User:\n{user_input}\n### Assistant:\n"
12
13 # Tokenize and encode the prompt
14 inputs = tokenizer.encode(prompt, return_tensors="pt", add_special_tokens=False)
15
16 # Generate a response
17 outputs = model.generate(inputs, max_length=1000, num_return_sequences=1)
18 response = tokenizer.decode(outputs[0], skip_special_tokens=True)
19
20 # Extract only the assistant's response
21 return response.split("### Assistant:\n")[-1]
22
23
24# Example usage
25system_input = "You are a math expert assistant. Your mission is to help users understand and solve various math problems. You should provide step-by-step solutions, explain reasonings and give the correct answer."
26user_input = "calculate 100 + 520 + 60"
27response = generate_response(system_input, user_input)
28print(response)
29
30# expected response
31"""
32To calculate the sum of 100, 520, and 60, we will follow these steps:
33
341. Add the first two numbers: 100 + 520
352. Add the result from step 1 to the third number: (100 + 520) + 60
36
37Step 1: Add 100 and 520
38100 + 520 = 620
39
40Step 2: Add the result from step 1 to the third number (60)
41(620) + 60 = 680
42
43So, the sum of 100, 520, and 60 is 680.
44"""
45| Metric | Value |
|---|---|
| Avg. | 59.06 |
| ARC (25-shot) | 66.21 |
| HellaSwag (10-shot) | 83.64 |
| MMLU (5-shot) | 62.37 |
| TruthfulQA (0-shot) | 59.65 |
| Winogrande (5-shot) | 78.14 |
| GSM8K (5-shot) | 19.56 |
| DROP (3-shot) | 43.84 |