RichardErkhov commited on
Commit
1b8c69d
·
verified ·
1 Parent(s): 0d18cca

uploaded readme

Browse files
Files changed (1) hide show
  1. README.md +270 -0
README.md ADDED
@@ -0,0 +1,270 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
+ Mistral-Large-Instruct-2407 - GGUF
11
+ - Model creator: https://huggingface.co/mistralai/
12
+ - Original model: https://huggingface.co/mistralai/Mistral-Large-Instruct-2407/
13
+
14
+
15
+ | Name | Quant method | Size |
16
+ | ---- | ---- | ---- |
17
+ | [Mistral-Large-Instruct-2407.Q2_K.gguf](https://huggingface.co/RichardErkhov/mistralai_-_Mistral-Large-Instruct-2407-gguf/tree/main/) | Q2_K | 42.09GB |
18
+ | [Mistral-Large-Instruct-2407.IQ3_XS.gguf](https://huggingface.co/RichardErkhov/mistralai_-_Mistral-Large-Instruct-2407-gguf/tree/main/) | IQ3_XS | 46.7GB |
19
+ | [Mistral-Large-Instruct-2407.IQ3_S.gguf](https://huggingface.co/RichardErkhov/mistralai_-_Mistral-Large-Instruct-2407-gguf/tree/main/) | IQ3_S | 49.36GB |
20
+ | [Mistral-Large-Instruct-2407.Q3_K_S.gguf](https://huggingface.co/RichardErkhov/mistralai_-_Mistral-Large-Instruct-2407-gguf/tree/main/) | Q3_K_S | 49.22GB |
21
+ | [Mistral-Large-Instruct-2407.IQ3_M.gguf](https://huggingface.co/RichardErkhov/mistralai_-_Mistral-Large-Instruct-2407-gguf/tree/main/) | IQ3_M | 51.48GB |
22
+ | [Mistral-Large-Instruct-2407.Q3_K.gguf](https://huggingface.co/RichardErkhov/mistralai_-_Mistral-Large-Instruct-2407-gguf/tree/main/) | Q3_K | 55.04GB |
23
+ | [Mistral-Large-Instruct-2407.Q3_K_M.gguf](https://huggingface.co/RichardErkhov/mistralai_-_Mistral-Large-Instruct-2407-gguf/tree/main/) | Q3_K_M | 55.04GB |
24
+ | [Mistral-Large-Instruct-2407.Q3_K_L.gguf](https://huggingface.co/RichardErkhov/mistralai_-_Mistral-Large-Instruct-2407-gguf/tree/main/) | Q3_K_L | 60.12GB |
25
+ | [Mistral-Large-Instruct-2407.IQ4_XS.gguf](https://huggingface.co/RichardErkhov/mistralai_-_Mistral-Large-Instruct-2407-gguf/tree/main/) | IQ4_XS | 61.5GB |
26
+ | [Mistral-Large-Instruct-2407.Q4_0.gguf](https://huggingface.co/RichardErkhov/mistralai_-_Mistral-Large-Instruct-2407-gguf/tree/main/) | Q4_0 | 64.34GB |
27
+ | [Mistral-Large-Instruct-2407.IQ4_NL.gguf](https://huggingface.co/RichardErkhov/mistralai_-_Mistral-Large-Instruct-2407-gguf/tree/main/) | IQ4_NL | 64.92GB |
28
+ | [Mistral-Large-Instruct-2407.Q4_K_S.gguf](https://huggingface.co/RichardErkhov/mistralai_-_Mistral-Large-Instruct-2407-gguf/tree/main/) | Q4_K_S | 64.79GB |
29
+ | [Mistral-Large-Instruct-2407.Q4_K.gguf](https://huggingface.co/RichardErkhov/mistralai_-_Mistral-Large-Instruct-2407-gguf/tree/main/) | Q4_K | 68.19GB |
30
+ | [Mistral-Large-Instruct-2407.Q4_K_M.gguf](https://huggingface.co/RichardErkhov/mistralai_-_Mistral-Large-Instruct-2407-gguf/tree/main/) | Q4_K_M | 68.19GB |
31
+ | [Mistral-Large-Instruct-2407.Q4_1.gguf](https://huggingface.co/RichardErkhov/mistralai_-_Mistral-Large-Instruct-2407-gguf/tree/main/) | Q4_1 | 71.45GB |
32
+ | [Mistral-Large-Instruct-2407.Q5_0.gguf](https://huggingface.co/RichardErkhov/mistralai_-_Mistral-Large-Instruct-2407-gguf/tree/main/) | Q5_0 | 78.56GB |
33
+ | [Mistral-Large-Instruct-2407.Q5_K_S.gguf](https://huggingface.co/RichardErkhov/mistralai_-_Mistral-Large-Instruct-2407-gguf/tree/main/) | Q5_K_S | 78.56GB |
34
+ | [Mistral-Large-Instruct-2407.Q5_K.gguf](https://huggingface.co/RichardErkhov/mistralai_-_Mistral-Large-Instruct-2407-gguf/tree/main/) | Q5_K | 80.55GB |
35
+ | [Mistral-Large-Instruct-2407.Q5_K_M.gguf](https://huggingface.co/RichardErkhov/mistralai_-_Mistral-Large-Instruct-2407-gguf/tree/main/) | Q5_K_M | 80.55GB |
36
+ | [Mistral-Large-Instruct-2407.Q5_1.gguf](https://huggingface.co/RichardErkhov/mistralai_-_Mistral-Large-Instruct-2407-gguf/tree/main/) | Q5_1 | 85.68GB |
37
+ | [Mistral-Large-Instruct-2407.Q6_K.gguf](https://huggingface.co/RichardErkhov/mistralai_-_Mistral-Large-Instruct-2407-gguf/tree/main/) | Q6_K | 93.68GB |
38
+ | [Mistral-Large-Instruct-2407.Q8_0.gguf](https://huggingface.co/RichardErkhov/mistralai_-_Mistral-Large-Instruct-2407-gguf/tree/main/) | Q8_0 | 121.33GB |
39
+
40
+
41
+
42
+
43
+ Original model description:
44
+ ---
45
+ license: other
46
+ license_name: mrl
47
+ license_link: https://mistral.ai/licenses/MRL-0.1.md
48
+ language:
49
+ - en
50
+ - fr
51
+ - de
52
+ - es
53
+ - it
54
+ - pt
55
+ - zh
56
+ - ja
57
+ - ru
58
+ - ko
59
+
60
+ extra_gated_description: If you want to learn more about how we process your personal data, please read our <a href="https://mistral.ai/terms/">Privacy Policy</a>.
61
+ ---
62
+
63
+ # Model Card for Mistral-Large-Instruct-2407
64
+
65
+ Mistral-Large-Instruct-2407 is an advanced dense Large Language Model (LLM) of 123B parameters with state-of-the-art reasoning, knowledge and coding capabilities.
66
+
67
+ For more details about this model please refer to our release [blog post](https://mistral.ai/news/mistral-large-2407/).
68
+
69
+ ## Key features
70
+ - **Multi-lingual by design:** Dozens of languages supported, including English, French, German, Spanish, Italian, Chinese, Japanese, Korean, Portuguese, Dutch and Polish.
71
+ - **Proficient in coding:** Trained on 80+ coding languages such as Python, Java, C, C++, Javacsript, and Bash. Also trained on more specific languages such as Swift and Fortran.
72
+ - **Agentic-centric:** Best-in-class agentic capabilities with native function calling and JSON outputting.
73
+ - **Advanced Reasoning:** State-of-the-art mathematical and reasoning capabilities.
74
+ - **Mistral Research License:** Allows usage and modification for research and non-commercial usages.
75
+ - **Large Context:** A large 128k context window.
76
+
77
+ ## Metrics
78
+
79
+ ### Base Pretrained Benchmarks
80
+
81
+ | Benchmark | Score |
82
+ | --- | --- |
83
+ | MMLU | 84.0% |
84
+
85
+
86
+ ### Base Pretrained Multilingual Benchmarks (MMLU)
87
+ | Benchmark | Score |
88
+ | --- | --- |
89
+ | French | 82.8% |
90
+ | German | 81.6% |
91
+ | Spanish | 82.7% |
92
+ | Italian | 82.7% |
93
+ | Dutch | 80.7% |
94
+ | Portuguese | 81.6% |
95
+ | Russian | 79.0% |
96
+ | Korean | 60.1% |
97
+ | Japanese | 78.8% |
98
+ | Chinese | 74.8% |
99
+
100
+
101
+ ### Instruction Benchmarks
102
+
103
+ | Benchmark | Score |
104
+ | --- | --- |
105
+ | MT Bench | 8.63 |
106
+ | Wild Bench | 56.3 |
107
+ | Arena Hard| 73.2 |
108
+
109
+ ### Code & Reasoning Benchmarks
110
+ | Benchmark | Score |
111
+ | --- | --- |
112
+ | Human Eval | 92% |
113
+ | Human Eval Plus| 87% |
114
+ | MBPP Base| 80% |
115
+ | MBPP Plus| 69% |
116
+
117
+ ### Math Benchmarks
118
+
119
+ | Benchmark | Score |
120
+ | --- | --- |
121
+ | GSM8K | 93% |
122
+ | Math Instruct (0-shot, no CoT) | 70% |
123
+ | Math Instruct (0-shot, CoT)| 71.5% |
124
+
125
+ ## Usage
126
+
127
+ The model can be used with two different frameworks
128
+
129
+ - [`mistral_inference`](https://github.com/mistralai/mistral-inference): See [here](#mistral-inference)
130
+ - [`transformers`](https://github.com/huggingface/transformers): See [here](#transformers)
131
+
132
+ ### Mistral Inference
133
+
134
+ #### Install
135
+
136
+ It is recommended to use `mistralai/Mistral-Large-Instruct-2407` with [mistral-inference](https://github.com/mistralai/mistral-inference). For HF transformers code snippets, please keep scrolling.
137
+
138
+ ```
139
+ pip install mistral_inference
140
+ ```
141
+
142
+ #### Download
143
+
144
+ ```py
145
+ from huggingface_hub import snapshot_download
146
+ from pathlib import Path
147
+
148
+ mistral_models_path = Path.home().joinpath('mistral_models', 'Large')
149
+ mistral_models_path.mkdir(parents=True, exist_ok=True)
150
+
151
+ snapshot_download(repo_id="mistralai/Mistral-Large-Instruct-2407", allow_patterns=["params.json", "consolidated-*.safetensors", "tokenizer.model.v3"], local_dir=mistral_models_path)
152
+ ```
153
+
154
+ #### Chat
155
+
156
+ After installing `mistral_inference`, a `mistral-chat` CLI command should be available in your environment.
157
+ Given the size of this model, you will need a node with several GPUs (more than 300GB cumulated vRAM).
158
+ If you have 8 GPUs on your machine, you can chat with the model using
159
+
160
+ ```
161
+ torchrun --nproc-per-node 8 --no-python mistral-chat $HOME/mistral_models/Large --instruct --max_tokens 256 --temperature 0.7
162
+ ```
163
+
164
+ *E.g.* Try out something like:
165
+ ```
166
+ How expensive would it be to ask a window cleaner to clean all windows in Paris. Make a reasonable guess in US Dollar.
167
+ ```
168
+
169
+ #### Instruct following
170
+
171
+ ```py
172
+ from mistral_inference.transformer import Transformer
173
+ from mistral_inference.generate import generate
174
+
175
+ from mistral_common.tokens.tokenizers.mistral import MistralTokenizer
176
+ from mistral_common.protocol.instruct.messages import UserMessage
177
+ from mistral_common.protocol.instruct.request import ChatCompletionRequest
178
+
179
+ tokenizer = MistralTokenizer.from_file(f"{mistral_models_path}/tokenizer.model.v3")
180
+ model = Transformer.from_folder(mistral_models_path)
181
+
182
+ prompt = "How expensive would it be to ask a window cleaner to clean all windows in Paris. Make a reasonable guess in US Dollar."
183
+
184
+ completion_request = ChatCompletionRequest(messages=[UserMessage(content=prompt)])
185
+
186
+ tokens = tokenizer.encode_chat_completion(completion_request).tokens
187
+
188
+ out_tokens, _ = generate([tokens], model, max_tokens=64, temperature=0.7, eos_id=tokenizer.instruct_tokenizer.tokenizer.eos_id)
189
+ result = tokenizer.decode(out_tokens[0])
190
+
191
+ print(result)
192
+ ```
193
+
194
+ #### Function calling
195
+
196
+ ```py
197
+ from mistral_common.protocol.instruct.tool_calls import Function, Tool
198
+ from mistral_inference.transformer import Transformer
199
+ from mistral_inference.generate import generate
200
+
201
+ from mistral_common.tokens.tokenizers.mistral import MistralTokenizer
202
+ from mistral_common.protocol.instruct.messages import UserMessage
203
+ from mistral_common.protocol.instruct.request import ChatCompletionRequest
204
+
205
+
206
+ tokenizer = MistralTokenizer.from_file(f"{mistral_models_path}/tokenizer.model.v3")
207
+ model = Transformer.from_folder(mistral_models_path)
208
+
209
+ completion_request = ChatCompletionRequest(
210
+ tools=[
211
+ Tool(
212
+ function=Function(
213
+ name="get_current_weather",
214
+ description="Get the current weather",
215
+ parameters={
216
+ "type": "object",
217
+ "properties": {
218
+ "location": {
219
+ "type": "string",
220
+ "description": "The city and state, e.g. San Francisco, CA",
221
+ },
222
+ "format": {
223
+ "type": "string",
224
+ "enum": ["celsius", "fahrenheit"],
225
+ "description": "The temperature unit to use. Infer this from the users location.",
226
+ },
227
+ },
228
+ "required": ["location", "format"],
229
+ },
230
+ )
231
+ )
232
+ ],
233
+ messages=[
234
+ UserMessage(content="What's the weather like today in Paris?"),
235
+ ],
236
+ )
237
+
238
+ tokens = tokenizer.encode_chat_completion(completion_request).tokens
239
+
240
+ out_tokens, _ = generate([tokens], model, max_tokens=256, temperature=0.7, eos_id=tokenizer.instruct_tokenizer.tokenizer.eos_id)
241
+ result = tokenizer.decode(out_tokens[0])
242
+
243
+ print(result)
244
+ ```
245
+
246
+ ### Transformers
247
+
248
+ If you want to use Hugging Face `transformers` to generate text, you can do something like this.
249
+
250
+ ```py
251
+ from transformers import pipeline
252
+
253
+ messages = [
254
+ {"role": "system", "content": "You are a pirate chatbot who always responds in pirate speak!"},
255
+ {"role": "user", "content": "Who are you?"},
256
+ ]
257
+ chatbot = pipeline("text-generation", model="mistralai/Mistral-Large-Instruct-2407")
258
+ chatbot(messages)
259
+ ```
260
+
261
+ ## Limitations
262
+
263
+ The Mistral Large model is a quick demonstration that the base model can be easily fine-tuned to achieve compelling performance.
264
+ It does not have any moderation mechanisms. We're looking forward to engaging with the community on ways to
265
+ make the model finely respect guardrails, allowing for deployment in environments requiring moderated outputs.
266
+
267
+ ## The Mistral AI Team
268
+
269
+ Albert Jiang, Alexandre Sablayrolles, Alexis Tacnet, Alok Kothari, Antoine Roux, Arthur Mensch, Audrey Herblin-Stoop, Augustin Garreau, Austin Birky, Bam4d, Baptiste Bout, Baudouin de Monicault, Blanche Savary, Carole Rambaud, Caroline Feldman, Devendra Singh Chaplot, Diego de las Casas, Diogo Costa, Eleonore Arcelin, Emma Bou Hanna, Etienne Metzger, Gaspard Blanchet, Gianna Lengyel, Guillaume Bour, Guillaume Lample, Harizo Rajaona, Henri Roussez, Hichem Sattouf, Ian Mack, Jean-Malo Delignon, Jessica Chudnovsky, Justus Murke, Kartik Khandelwal, Lawrence Stewart, Louis Martin, Louis Ternon, Lucile Saulnier, Lélio Renard Lavaud, Margaret Jennings, Marie Pellat, Marie Torelli, Marie-Anne Lachaux, Marjorie Janiewicz, Mickaël Seznec, Nicolas Schuhl, Niklas Muhs, Olivier de Garrigues, Patrick von Platen, Paul Jacob, Pauline Buche, Pavan Kumar Reddy, Perry Savas, Pierre Stock, Romain Sauvestre, Sagar Vaze, Sandeep Subramanian, Saurabh Garg, Sophia Yang, Szymon Antoniak, Teven Le Scao, Thibault Schueller, Thibaut Lavril, Thomas Wang, Théophile Gervet, Timothée Lacroix, Valera Nemychnikova, Wendy Shang, William El Sayed, William Marshall
270
+