RichardErkhov commited on
Commit
230e780
·
verified ·
1 Parent(s): ba041dc

uploaded readme

Browse files
Files changed (1) hide show
  1. README.md +489 -0
README.md ADDED
@@ -0,0 +1,489 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ Quantization made by Richard Erkhov.
2
+
3
+ [Github](https://github.com/RichardErkhov)
4
+
5
+ [Discord](https://discord.gg/pvy7H8DZMG)
6
+
7
+ [Request more models](https://github.com/RichardErkhov/quant_request)
8
+
9
+
10
+ Llama-3.1-Storm-8B - bnb 8bits
11
+ - Model creator: https://huggingface.co/akjindal53244/
12
+ - Original model: https://huggingface.co/akjindal53244/Llama-3.1-Storm-8B/
13
+
14
+
15
+
16
+
17
+ Original model description:
18
+ ---
19
+ language:
20
+ - en
21
+ - de
22
+ - fr
23
+ - it
24
+ - pt
25
+ - hi
26
+ - es
27
+ - th
28
+ license: llama3.1
29
+ library_name: transformers
30
+ tags:
31
+ - llama-3.1
32
+ - conversational
33
+ - instruction following
34
+ - reasoning
35
+ - function calling
36
+ - mergekit
37
+ - finetuning
38
+ - axolotl
39
+ pipeline_tag: text-generation
40
+ model-index:
41
+ - name: Llama-3.1-Storm-8B
42
+ results:
43
+ - task:
44
+ type: text-generation
45
+ name: Text Generation
46
+ dataset:
47
+ name: IFEval (0-Shot)
48
+ type: HuggingFaceH4/ifeval
49
+ args:
50
+ num_few_shot: 0
51
+ metrics:
52
+ - type: inst_level_strict_acc and prompt_level_strict_acc
53
+ value: 80.51
54
+ name: strict accuracy
55
+ source:
56
+ url: https://huggingface.co/spaces/open-llm-leaderboard/open_llm_leaderboard?query=akjindal53244/Llama-3.1-Storm-8B
57
+ name: Open LLM Leaderboard
58
+ - task:
59
+ type: text-generation
60
+ name: Text Generation
61
+ dataset:
62
+ name: BBH (3-Shot)
63
+ type: BBH
64
+ args:
65
+ num_few_shot: 3
66
+ metrics:
67
+ - type: acc_norm
68
+ value: 31.49
69
+ name: normalized accuracy
70
+ source:
71
+ url: https://huggingface.co/spaces/open-llm-leaderboard/open_llm_leaderboard?query=akjindal53244/Llama-3.1-Storm-8B
72
+ name: Open LLM Leaderboard
73
+ - task:
74
+ type: text-generation
75
+ name: Text Generation
76
+ dataset:
77
+ name: MATH Lvl 5 (4-Shot)
78
+ type: hendrycks/competition_math
79
+ args:
80
+ num_few_shot: 4
81
+ metrics:
82
+ - type: exact_match
83
+ value: 16.62
84
+ name: exact match
85
+ source:
86
+ url: https://huggingface.co/spaces/open-llm-leaderboard/open_llm_leaderboard?query=akjindal53244/Llama-3.1-Storm-8B
87
+ name: Open LLM Leaderboard
88
+ - task:
89
+ type: text-generation
90
+ name: Text Generation
91
+ dataset:
92
+ name: GPQA (0-shot)
93
+ type: Idavidrein/gpqa
94
+ args:
95
+ num_few_shot: 0
96
+ metrics:
97
+ - type: acc_norm
98
+ value: 10.18
99
+ name: acc_norm
100
+ source:
101
+ url: https://huggingface.co/spaces/open-llm-leaderboard/open_llm_leaderboard?query=akjindal53244/Llama-3.1-Storm-8B
102
+ name: Open LLM Leaderboard
103
+ - task:
104
+ type: text-generation
105
+ name: Text Generation
106
+ dataset:
107
+ name: MuSR (0-shot)
108
+ type: TAUR-Lab/MuSR
109
+ args:
110
+ num_few_shot: 0
111
+ metrics:
112
+ - type: acc_norm
113
+ value: 9.12
114
+ name: acc_norm
115
+ source:
116
+ url: https://huggingface.co/spaces/open-llm-leaderboard/open_llm_leaderboard?query=akjindal53244/Llama-3.1-Storm-8B
117
+ name: Open LLM Leaderboard
118
+ - task:
119
+ type: text-generation
120
+ name: Text Generation
121
+ dataset:
122
+ name: MMLU-PRO (5-shot)
123
+ type: TIGER-Lab/MMLU-Pro
124
+ config: main
125
+ split: test
126
+ args:
127
+ num_few_shot: 5
128
+ metrics:
129
+ - type: acc
130
+ value: 31.15
131
+ name: accuracy
132
+ source:
133
+ url: https://huggingface.co/spaces/open-llm-leaderboard/open_llm_leaderboard?query=akjindal53244/Llama-3.1-Storm-8B
134
+ name: Open LLM Leaderboard
135
+ ---
136
+
137
+ ![image/jpeg](https://cdn-uploads.huggingface.co/production/uploads/64c75c1237333ccfef30a602/tmOlbERGKP7JSODa6T06J.jpeg)
138
+
139
+ Authors: [Ashvini Kumar Jindal](https://www.linkedin.com/in/ashvini-jindal-26653262/), [Pawan Kumar Rajpoot](https://www.linkedin.com/in/pawanrajpoot/), [Ankur Parikh](https://www.linkedin.com/in/ankurnlpexpert/), [Akshita Sukhlecha](https://www.linkedin.com/in/akshita-sukhlecha/)
140
+
141
+ **🤗 Hugging Face Announcement Blog**: https://huggingface.co/blog/akjindal53244/llama31-storm8b
142
+
143
+ **🚀Ollama:** `ollama run ajindal/llama3.1-storm:8b`
144
+
145
+
146
+ ## TL;DR
147
+
148
+ ![image/png](https://cdn-uploads.huggingface.co/production/uploads/64c75c1237333ccfef30a602/mDtDeiHwnBupw1k_n99Lf.png)
149
+
150
+ We present the [**Llama-3.1-Storm-8B**](https://huggingface.co/akjindal53244/Llama-3.1-Storm-8B) model that outperforms Meta AI's [Llama-3.1-8B-Instruct](https://huggingface.co/meta-llama/Meta-Llama-3.1-8B-Instruct) and [Hermes-3-Llama-3.1-8B](https://huggingface.co/NousResearch/Hermes-3-Llama-3.1-8B) models significantly across diverse benchmarks as shown in the performance comparison plot in the next section. Our approach consists of three key steps:
151
+ 1. **Self-Curation**: We applied two self-curation methods to select approximately 1 million high-quality examples from a pool of ~2.8 million open-source examples. **Our curation criteria focused on educational value and difficulty level, using the same SLM for annotation instead of larger models (e.g. 70B, 405B).**
152
+ 2. **Targeted fine-tuning**: We performed [Spectrum](https://arxiv.org/abs/2406.06623)-based targeted fine-tuning over the Llama-3.1-8B-Instruct model. The Spectrum method accelerates training by selectively targeting layer modules based on their signal-to-noise ratio (SNR), and freezing the remaining modules. In our work, 50% of layers are frozen.
153
+ 3. **Model Merging**: We merged our fine-tuned model with the [Llama-Spark](https://huggingface.co/arcee-ai/Llama-Spark) model using [SLERP](https://huggingface.co/blog/mlabonne/merge-models#1-slerp) method. The merging method produces a blended model with characteristics smoothly interpolated from both parent models, ensuring the resultant model captures the essence of both its parents. [Llama-3.1-Storm-8B](https://huggingface.co/akjindal53244/Llama-3.1-Storm-8B) improves Llama-3.1-8B-Instruct across 10 diverse benchmarks. These benchmarks cover areas such as instruction-following, knowledge-driven QA, reasoning, truthful answer generation, and function calling.
154
+
155
+ ## 🏆 Introducing Llama-3.1-Storm-8B
156
+ [**Llama-3.1-Storm-8B**](https://huggingface.co/akjindal53244/Llama-3.1-Storm-8B) builds upon the foundation of Llama-3.1-8B-Instruct, aiming to enhance both conversational and function calling capabilities within the 8B parameter model class.
157
+
158
+ As shown in the left subplot of the above figure, [**Llama-3.1-Storm-8B**](https://huggingface.co/akjindal53244/Llama-3.1-Storm-8B) model improves Meta-Llama-3.1-8B-Instruct across various benchmarks - Instruction-following ([IFEval](https://arxiv.org/abs/2311.07911)), Knowledge-driven QA benchmarks ([GPQA](https://arxiv.org/abs/2311.12022), [MMLU-Pro](https://arxiv.org/pdf/2406.01574)), Reasoning ([ARC-C](https://arxiv.org/abs/1803.05457), [MuSR](https://arxiv.org/abs/2310.16049), [BBH](https://arxiv.org/pdf/2210.09261)), Reduced Hallucinations ([TruthfulQA](https://arxiv.org/abs/2109.07958)), and Function-Calling ([BFCL](https://huggingface.co/datasets/gorilla-llm/Berkeley-Function-Calling-Leaderboard)). This improvement is particularly significant for AI developers and enthusiasts who work with limited computational resources.
159
+
160
+ We also benchmarked our model with the recently published model [Hermes-3-Llama-3.1-8B](https://huggingface.co/NousResearch/Hermes-3-Llama-3.1-8B) built on top of the Llama-3.1-8B-Instruct model. As shown in the right subplot of the above figure, **Llama-3.1-Storm-8B outperforms Hermes-3-Llama-3.1-8B on 7 out of 9 benchmarks**, with Hermes-3-Llama-3.1-8B surpassing Llama-3.1-Storm-8B on the MuSR benchmark and both models showing comparable performance on the BBH benchmark.
161
+
162
+
163
+ ## Llama-3.1-Storm-8B Model Strengths
164
+ Llama-3.1-Storm-8B is a powerful generalist model useful for diverse applications. We invite the AI community to explore [Llama-3.1-Storm-8B](https://huggingface.co/collections/akjindal53244/storm-66ba6c96b7e24ecb592787a9) and look forward to seeing how it will be utilized in various projects and applications.
165
+
166
+ <table>
167
+ <tr>
168
+ <td><strong>Model Strength</strong>
169
+ </td>
170
+ <td><strong>Relevant Benchmarks</strong>
171
+ </td>
172
+ <tr>
173
+ <tr>
174
+ <td>🎯 Improved Instruction Following
175
+ </td>
176
+ <td>IFEval Strict (+3.93%)
177
+ </td>
178
+ <tr>
179
+ <tr>
180
+ <td>🌐 Enhanced Knowledge Driven Question Answering
181
+ </td>
182
+ <td>GPQA (+7.21%), MMLU-Pro (+0.55%), AGIEval (+3.77%)
183
+ </td>
184
+ <tr>
185
+ <tr>
186
+ <td>🧠 Better Reasoning
187
+ </td>
188
+ <td>ARC-C (+3.92%), MuSR (+2.77%), BBH (+1.67%), AGIEval (+3.77%)
189
+ </td>
190
+ <tr>
191
+ <tr>
192
+ <td>🤖 Superior Agentic Capabilities
193
+ </td>
194
+ <td>BFCL: Overall Acc (+7.92%), BFCL: AST Summary (+12.32%)
195
+ </td>
196
+ <tr>
197
+ <tr>
198
+ <td>🚫 Reduced Hallucinations
199
+ </td>
200
+ <td>TruthfulQA (+9%)
201
+ </td>
202
+ <tr>
203
+ </table>
204
+
205
+ **Note**: All improvements are absolute gains over Meta-Llama-3.1-8B-Instruct.
206
+
207
+
208
+ ## Llama-3.1-Storm-8B Models
209
+ 1. `BF16`: [Llama-3.1-Storm-8B](https://huggingface.co/akjindal53244/Llama-3.1-Storm-8B)
210
+ 2. ⚡ `FP8`: [Llama-3.1-Storm-8B-FP8-Dynamic](https://huggingface.co/akjindal53244/Llama-3.1-Storm-8B-FP8-Dynamic)
211
+ 3. ⚡ `GGUF`: [Llama-3.1-Storm-8B-GGUF](https://huggingface.co/akjindal53244/Llama-3.1-Storm-8B-GGUF)
212
+ 4. 🚀 Ollama: `ollama run ajindal/llama3.1-storm:8b`
213
+
214
+
215
+ ## 💻 How to Use the Model
216
+ The Hugging Face `transformers` library loads the model in `bfloat16` by default. This is the type used by the [Llama-3.1-Storm-8B](https://huggingface.co/akjindal53244/Llama-3.1-Storm-8B) checkpoint, so it’s the recommended way to run to ensure the best results.
217
+
218
+ ### Installation
219
+ ```bash
220
+ pip install --upgrade "transformers>=4.43.2" torch==2.3.1 accelerate vllm==0.5.3.post1
221
+ ```
222
+
223
+ Developers can easily integrate Llama-3.1-Storm-8B into their projects using popular libraries like Transformers and vLLM. The following sections illustrate the usage with simple hands-on examples:
224
+
225
+ ### Conversational Use-case
226
+ #### Use with [🤗 Transformers](https://github.com/huggingface/transformers)
227
+ ##### Using `transformers.pipeline()` API
228
+ ```python
229
+ import transformers
230
+ import torch
231
+
232
+ model_id = "akjindal53244/Llama-3.1-Storm-8B"
233
+ pipeline = transformers.pipeline(
234
+ "text-generation",
235
+ model=model_id,
236
+ model_kwargs={"torch_dtype": torch.bfloat16},
237
+ device_map="auto",
238
+ )
239
+
240
+ messages = [
241
+ {"role": "system", "content": "You are a helpful assistant."},
242
+ {"role": "user", "content": "What is 2+2?"}
243
+ ]
244
+
245
+ outputs = pipeline(messages, max_new_tokens=128, do_sample=True, temperature=0.01, top_k=100, top_p=0.95)
246
+ print(outputs[0]["generated_text"][-1]) # Expected Output: {'role': 'assistant', 'content': '2 + 2 = 4'}
247
+ ```
248
+
249
+ ##### Using `model.generate()` API
250
+ ```bash
251
+ pip install flash_attn==2.6.3
252
+ ```
253
+
254
+ ```python
255
+ import torch
256
+ from transformers import AutoTokenizer, LlamaForCausalLM
257
+
258
+ # Apply Llama3.1 chat-template
259
+ def format_prompt(user_query):
260
+ template = """<|begin_of_text|><|start_header_id|>system<|end_header_id|>\n\nYou are a helpful assistant.<|eot_id|><|start_header_id|>user<|end_header_id|>\n\n{}<|eot_id|><|start_header_id|>assistant<|end_header_id|>\n\n"""
261
+ return template.format(user_query)
262
+
263
+
264
+ model_id = 'akjindal53244/Llama-3.1-Storm-8B'
265
+ tokenizer = AutoTokenizer.from_pretrained(model_id, trust_remote_code=True)
266
+ model = LlamaForCausalLM.from_pretrained(
267
+ model_id,
268
+ torch_dtype=torch.bfloat16,
269
+ device_map="auto",
270
+ load_in_8bit=False,
271
+ load_in_4bit=False,
272
+ use_flash_attention_2=True
273
+ )
274
+
275
+ # Build final input prompt after applying chat-template
276
+ prompt = format_prompt("What is 2+2?")
277
+
278
+ input_ids = tokenizer(prompt, return_tensors="pt").input_ids.to("cuda")
279
+ generated_ids = model.generate(input_ids, max_new_tokens=128, temperature=0.01, do_sample=True, eos_token_id=tokenizer.eos_token_id)
280
+ response = tokenizer.decode(generated_ids[0][input_ids.shape[-1]:], skip_special_tokens=True)
281
+ print(response) # Expected Output: '2 + 2 = 4'
282
+ ```
283
+
284
+ #### Use with [vLLM](https://github.com/vllm-project/vllm)
285
+ ```python
286
+ from vllm import LLM, SamplingParams
287
+ from transformers import AutoTokenizer
288
+
289
+ model_id = "akjindal53244/Llama-3.1-Storm-8B" # FP8 model: "akjindal53244/Llama-3.1-Storm-8B-FP8-Dynamic"
290
+ num_gpus = 1
291
+
292
+ tokenizer = AutoTokenizer.from_pretrained(model_id)
293
+ llm = LLM(model=model_id, tensor_parallel_size=num_gpus)
294
+ sampling_params = SamplingParams(max_tokens=128, temperature=0.01, top_k=100, top_p=0.95)
295
+
296
+ messages = [
297
+ {"role": "system", "content": "You are a helpful assistant."},
298
+ {"role": "user", "content": "What is 2+2?"}
299
+ ]
300
+ prompt = tokenizer.apply_chat_template(messages, add_generation_prompt=True, tokenize = False)
301
+ print(llm.generate([prompt], sampling_params)[0].outputs[0].text.strip()) # Expected Output: 2 + 2 = 4
302
+ ```
303
+
304
+ #### Use with [LitGPT](https://github.com/Lightning-AI/litgpt)
305
+ ```bash
306
+ pip install 'litgpt[all]'
307
+ litgpt download akjindal53244/Llama-3.1-Storm-8B --model_name meta-llama/Meta-Llama-3.1-8B
308
+ ```
309
+
310
+ ```python
311
+ from litgpt import LLM
312
+
313
+ llm = LLM.load(model="akjindal53244/Llama-3.1-Storm-8B")
314
+ llm.generate("What do Llamas eat?")
315
+ ```
316
+
317
+ ### Function Calling Use-case
318
+
319
+ [**Llama-3.1-Storm-8B**](https://huggingface.co/collections/akjindal53244/storm-66ba6c96b7e24ecb592787a9) has impressive function calling capabilities compared to Meta-Llama-3.1-8B-Instruct as demonstrated by the BFCL benchmark.
320
+
321
+ #### Prompt Format for Function Calling
322
+ Llama-3.1-Storm-8B is trained with specific system prompt for Function Calling:
323
+ ```
324
+ You are a function calling AI model. You may call one or more functions to assist with the user query. Don't make assumptions about what values to plug into function. The user may use the terms function calling or tool use interchangeably.
325
+
326
+ Here are the available functions:
327
+ <tools>LIST_OF_TOOLS</tools>
328
+
329
+ For each function call return a json object with function name and arguments within <tool_call></tool_call> XML tags in the format:
330
+ <tool_call>{"tool_name": <function-name>, "tool_arguments": <args-dict>}</tool_call>
331
+ ```
332
+ Above system prompt should be used with passing `LIST_OF_TOOLS` as input.
333
+
334
+
335
+ #### Use with [vLLM](https://github.com/vllm-project/vllm)
336
+ ```python
337
+ import json
338
+ from vllm import LLM, SamplingParams
339
+ from transformers import AutoTokenizer
340
+
341
+ model_id = "akjindal53244/Llama-3.1-Storm-8B" # FP8 model: "akjindal53244/Llama-3.1-Storm-8B-FP8-Dynamic"
342
+ num_gpus = 1
343
+
344
+ tokenizer = AutoTokenizer.from_pretrained(model_id)
345
+ llm = LLM(model=model_id, tensor_parallel_size=num_gpus)
346
+ sampling_params = SamplingParams(max_tokens=128, temperature=0.01, top_k=100, top_p=0.95)
347
+
348
+
349
+ def create_system_prompt(tools_list):
350
+ system_prompt_format = """You are a function calling AI model. You may call one or more functions to assist with the user query. Don't make assumptions about what values to plug into function. The user may use the terms function calling or tool use interchangeably.
351
+
352
+ Here are the available functions:
353
+ <tools>{}</tools>
354
+
355
+ For each function call return a json object with function name and arguments within <tool_call></tool_call> XML tags in the format:
356
+ <tool_call>{"tool_name": <function-name>, "tool_arguments": <args-dict>}</tool_call>"""
357
+
358
+ # Convert the tools list to a string representation
359
+ tools_str = json.dumps(tools_list, ensure_ascii=False)
360
+ # Format the system prompt with the tools list
361
+ system_prompt = system_prompt_format.format(tools_str)
362
+ return system_prompt
363
+
364
+
365
+ # Example tools list
366
+ tools_list = [
367
+ {
368
+ "name": "peers",
369
+ "description": "Retrieves a list of company peers given a stock symbol.",
370
+ "parameters": {
371
+ "symbol": {
372
+ "description": "The stock symbol for the company.",
373
+ "type": "str",
374
+ "default": ""
375
+ }
376
+ }
377
+ },
378
+ {
379
+ "name": "web_chain_details",
380
+ "description": "python",
381
+ "parameters": {
382
+ "chain_slug": {
383
+ "description": "The slug identifier for the blockchain (e.g., 'ethereum' for Ethereum mainnet).",
384
+ "type": "str",
385
+ "default": "ethereum"
386
+ }
387
+ }
388
+ }
389
+ ]
390
+
391
+ # Create the system prompt with the tools list
392
+ system_prompt = create_system_prompt(tools_list)
393
+
394
+ messages = [
395
+ {"role": "system", "content": system_prompt},
396
+ {"role": "user", "content": "I need to understand the details of the Ethereum blockchain for my cryptocurrency project. Can you fetch the details for 'ethereum'?"}
397
+ ]
398
+
399
+ prompt = tokenizer.apply_chat_template(messages, add_generation_prompt=True, tokenize = False)
400
+ print(llm.generate([prompt], sampling_params)[0].outputs[0].text.strip()) # Expected Output: <tool_call>{'tool_name': 'web_chain_details', 'tool_arguments': {'chain_slug': 'ethereum'}}</tool_call>
401
+ ```
402
+
403
+ #### Use with [Ollama](https://ollama.com/)
404
+ ```
405
+ import ollama
406
+
407
+ tools = [{
408
+ 'type': 'function',
409
+ 'function': {
410
+ 'name': 'get_current_weather',
411
+ 'description': 'Get the current weather for a city',
412
+ 'parameters': {
413
+ 'type': 'object',
414
+ 'properties': {
415
+ 'city': {
416
+ 'type': 'string',
417
+ 'description': 'The name of the city',
418
+ },
419
+ },
420
+ 'required': ['city'],
421
+ },
422
+ },
423
+ },
424
+ {
425
+ 'type': 'function',
426
+ 'function': {
427
+ 'name': 'get_places_to_vist',
428
+ 'description': 'Get places to visit in a city',
429
+ 'parameters': {
430
+ 'type': 'object',
431
+ 'properties': {
432
+ 'city': {
433
+ 'type': 'string',
434
+ 'description': 'The name of the city',
435
+ },
436
+ },
437
+ 'required': ['city'],
438
+ },
439
+ },
440
+ },
441
+ ]
442
+
443
+ response = ollama.chat(
444
+ model='ajindal/llama3.1-storm:8b',
445
+ messages=[
446
+ {'role': 'system', 'content': 'Do not answer to nay vulgar questions.'},
447
+ {'role': 'user', 'content': 'What is the weather in Toronto and San Francisco?'}
448
+ ],
449
+ tools=tools
450
+ )
451
+
452
+ print(response['message']) # Expected Response: {'role': 'assistant', 'content': "<tool_call>{'tool_name': 'get_current_weather', 'tool_arguments': {'city': 'Toronto'}}</tool_call>"}
453
+ ```
454
+
455
+
456
+ ## Alignment Note
457
+ While **Llama-3.1-Storm-8B** did not undergo an explicit model alignment process, it may still retain some alignment properties inherited from the Meta-Llama-3.1-8B-Instruct model.
458
+
459
+ ## Cite Our Work
460
+ ```
461
+ @misc {ashvini_kumar_jindal_2024,
462
+ author = { {Ashvini Kumar Jindal, Pawan Kumar Rajpoot, Ankur Parikh, Akshita Sukhlecha} },
463
+ title = { Llama-3.1-Storm-8B },
464
+ year = 2024,
465
+ url = { https://huggingface.co/akjindal53244/Llama-3.1-Storm-8B },
466
+ doi = { 10.57967/hf/2902 },
467
+ publisher = { Hugging Face }
468
+ }
469
+ ```
470
+
471
+ ## Support Our Work
472
+ With 3 team-members spanned across 3 different time-zones, we have won [NeurIPS LLM Efficiency Challenge 2023](https://llm-efficiency-challenge.github.io/) and 4 other competitions in Finance and Arabic LLM space. We have also published [SOTA mathematical reasoning model](https://huggingface.co/akjindal53244/Arithmo-Mistral-7B).
473
+
474
+ **Llama-3.1-Storm-8B** is our most valuable contribution so far towards the open-source community. We are committed in developing efficient generalist LLMs. **We're seeking both computational resources and innovative collaborators to drive this initiative forward.**
475
+ # [Open LLM Leaderboard Evaluation Results](https://huggingface.co/spaces/open-llm-leaderboard/open_llm_leaderboard)
476
+ Detailed results can be found [here](https://huggingface.co/datasets/open-llm-leaderboard/akjindal53244__Llama-3.1-Storm-8B-details)
477
+
478
+ | Metric |Value|
479
+ |-------------------|----:|
480
+ |Avg. |29.84|
481
+ |IFEval (0-Shot) |80.51|
482
+ |BBH (3-Shot) |31.49|
483
+ |MATH Lvl 5 (4-Shot)|16.62|
484
+ |GPQA (0-shot) |10.18|
485
+ |MuSR (0-shot) | 9.12|
486
+ |MMLU-PRO (5-shot) |31.15|
487
+
488
+
489
+