GGUF
Inference Endpoints
munish0838 commited on
Commit
823c542
1 Parent(s): ab41bce

Upload README.md with huggingface_hub

Browse files
Files changed (1) hide show
  1. README.md +153 -0
README.md ADDED
@@ -0,0 +1,153 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+
2
+ ---
3
+
4
+ license: apache-2.0
5
+ language:
6
+ - en
7
+ - fr
8
+ - de
9
+ - es
10
+ - it
11
+ - pt
12
+ - ru
13
+ - zh
14
+ - ja
15
+
16
+ ---
17
+
18
+ ![](https://cdn.discordapp.com/attachments/791342238541152306/1264099835221381251/image.png?ex=669ca436&is=669b52b6&hm=129f56187c31e1ed22cbd1bcdbc677a2baeea5090761d2f1a458c8b1ec7cca4b&)
19
+
20
+ # QuantFactory/Mistral-Nemo-Base-2407-GGUF
21
+ This is quantized version of [mistralai/Mistral-Nemo-Base-2407](https://huggingface.co/mistralai/Mistral-Nemo-Base-2407) created using llama.cpp
22
+
23
+ # Original Model Card
24
+
25
+
26
+ # Model Card for Mistral-Nemo-Base-2407
27
+
28
+ The Mistral-Nemo-Base-2407 Large Language Model (LLM) is a pretrained generative text model of 12B parameters trained jointly by Mistral AI and NVIDIA, it significantly outperforms existing models smaller or similar in size.
29
+
30
+ For more details about this model please refer to our release [blog post](https://mistral.ai/news/mistral-nemo/).
31
+
32
+ ## Key features
33
+ - Released under the **Apache 2 License**
34
+ - Pre-trained and instructed versions
35
+ - Trained with a **128k context window**
36
+ - Trained on a large proportion of **multilingual and code data**
37
+ - Drop-in replacement of Mistral 7B
38
+
39
+ ## Model Architecture
40
+ Mistral Nemo is a transformer model, with the following architecture choices:
41
+ - **Layers:** 40
42
+ - **Dim:** 5,120
43
+ - **Head dim:** 128
44
+ - **Hidden dim:** 14,436
45
+ - **Activation Function:** SwiGLU
46
+ - **Number of heads:** 32
47
+ - **Number of kv-heads:** 8 (GQA)
48
+ - **Vocabulary size:** 2**17 ~= 128k
49
+ - **Rotary embeddings (theta = 1M)**
50
+
51
+ ## Metrics
52
+
53
+ ### Main Benchmarks
54
+
55
+ | Benchmark | Score |
56
+ | --- | --- |
57
+ | HellaSwag (0-shot) | 83.5% |
58
+ | Winogrande (0-shot) | 76.8% |
59
+ | OpenBookQA (0-shot) | 60.6% |
60
+ | CommonSenseQA (0-shot) | 70.4% |
61
+ | TruthfulQA (0-shot) | 50.3% |
62
+ | MMLU (5-shot) | 68.0% |
63
+ | TriviaQA (5-shot) | 73.8% |
64
+ | NaturalQuestions (5-shot) | 31.2% |
65
+
66
+ ### Multilingual Benchmarks (MMLU)
67
+
68
+ | Language | Score |
69
+ | --- | --- |
70
+ | French | 62.3% |
71
+ | German | 62.7% |
72
+ | Spanish | 64.6% |
73
+ | Italian | 61.3% |
74
+ | Portuguese | 63.3% |
75
+ | Russian | 59.2% |
76
+ | Chinese | 59.0% |
77
+ | Japanese | 59.0% |
78
+
79
+
80
+ ## Usage
81
+
82
+ The model can be used with three different frameworks
83
+
84
+ - [`mistral_inference`](https://github.com/mistralai/mistral-inference): See [here](#mistral-inference)
85
+ - [`transformers`](https://github.com/huggingface/transformers): See [here](#transformers)
86
+ - [`NeMo`](https://github.com/NVIDIA/NeMo): See [nvidia/Mistral-NeMo-12B-Base](https://huggingface.co/nvidia/Mistral-NeMo-12B-Base)
87
+
88
+
89
+ ### Mistral Inference
90
+
91
+
92
+ #### Install
93
+
94
+ It is recommended to use `mistralai/Mistral-Nemo-Base-2407` with [mistral-inference](https://github.com/mistralai/mistral-inference).
95
+ For HF transformers code snippets, please keep scrolling.
96
+
97
+ ```
98
+ pip install mistral_inference
99
+ ```
100
+
101
+ #### Download
102
+
103
+ ```py
104
+ from huggingface_hub import snapshot_download
105
+ from pathlib import Path
106
+
107
+ mistral_models_path = Path.home().joinpath('mistral_models', 'Nemo-v0.1')
108
+ mistral_models_path.mkdir(parents=True, exist_ok=True)
109
+
110
+ snapshot_download(repo_id="mistralai/Mistral-Nemo-Base-2407", allow_patterns=["params.json", "consolidated.safetensors", "tekken.json"], local_dir=mistral_models_path)
111
+ ```
112
+
113
+ #### Demo
114
+
115
+ After installing `mistral_inference`, a `mistral-demo` CLI command should be available in your environment.
116
+
117
+ ```
118
+ mistral-demo $HOME/mistral_models/Nemo-v0.1
119
+ ```
120
+
121
+ ### Transformers
122
+
123
+ > [!IMPORTANT]
124
+ > NOTE: Until a new release has been made, you need to install transformers from source:
125
+ > ```sh
126
+ > pip install git+https://github.com/huggingface/transformers.git
127
+ > ```
128
+
129
+ If you want to use Hugging Face `transformers` to generate text, you can do something like this.
130
+
131
+ ```py
132
+ from transformers import AutoModelForCausalLM, AutoTokenizer
133
+
134
+ model_id = "mistralai/Mistral-Nemo-Base-2407"
135
+ tokenizer = AutoTokenizer.from_pretrained(model_id)
136
+
137
+ model = AutoModelForCausalLM.from_pretrained(model_id)
138
+ inputs = tokenizer("Hello my name is", return_tensors="pt")
139
+
140
+ outputs = model.generate(**inputs, max_new_tokens=20)
141
+ print(tokenizer.decode(outputs[0], skip_special_tokens=True))
142
+ ```
143
+
144
+ > [!TIP]
145
+ > Unlike previous Mistral models, Mistral Nemo requires smaller temperatures. We recommend to use a temperature of 0.3.
146
+
147
+ ## Note
148
+
149
+ `Mistral-Nemo-Base-2407` is a pretrained base model and therefore does not have any moderation mechanisms.
150
+
151
+ ## The Mistral AI Team
152
+
153
+ 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, 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