Ichigo2899 commited on
Commit
222f21d
1 Parent(s): 3b3e4f7

Upload folder using huggingface_hub

Browse files
Files changed (4) hide show
  1. README.md +60 -0
  2. config.json +12 -0
  3. model.safetensors +3 -0
  4. tokenizer.model +3 -0
README.md ADDED
@@ -0,0 +1,60 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: apache-2.0
3
+ ---
4
+
5
+ # Model Card for Mamba-Codestral-7B-v0.1
6
+
7
+ Codestral Mamba is an open code model based on the Mamba2 architecture. It performs on par with state-of-the-art Transformer-based code models. \
8
+ You can read more in the [official blog post](https://mistral.ai/news/codestral-mamba/).
9
+
10
+
11
+ ## Installation
12
+
13
+ It is recommended to use `mistralai/mamba-codestral-7B-v0.1` with [mistral-inference](https://github.com/mistralai/mistral-inference)
14
+
15
+
16
+ ```
17
+ pip install mistral_inference>=1 mamba-ssm causal-conv1d
18
+ ```
19
+
20
+ or directly with the original [`mamba`](https://github.com/state-spaces/mamba) package:
21
+
22
+ ```
23
+ pip install mamba_ssm causal-conv1d
24
+ ```
25
+
26
+ ## Download
27
+
28
+ ```py
29
+ from huggingface_hub import snapshot_download
30
+ from pathlib import Path
31
+
32
+ mistral_models_path = Path.home().joinpath('mistral_models', 'mamba-codestral-7B-v0.1')
33
+ mistral_models_path.mkdir(parents=True, exist_ok=True)
34
+
35
+ snapshot_download(repo_id="mistralai/mamba-codestral-7B-v0.1", allow_patterns=["params.json", "consolidated.safetensors", "tokenizer.model.v3"], local_dir=mistral_models_path)
36
+ ```
37
+
38
+ ### Chat
39
+
40
+ After installing `mistral_inference`, a `mistral-demo` CLI command should be available in your environment.
41
+
42
+ ```
43
+ mistral-chat $HOME/mistral_models/mamba-codestral-7B-v0.1 --instruct --max_tokens 256
44
+ ```
45
+
46
+ ## Evaluation
47
+ We evaluate Codestral Mamba, Codestral and open-weight models of similar size on industry-standard benchmarks.
48
+ | Benchmarks | HumanEval | MBPP | Spider | CruxE | HumanEval C++ | HumanEvalJava |HumanEvalJS |HumanEval Bash |
49
+ | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: |
50
+ | CodeGemma 1.1 7B | 61.0% | 67.7% | 46.3% | 50.4% | 49.1% | 41.8% | 52.2% | 9.4% |
51
+ | CodeLlama 7B | 31.1% | 48.2% | 29.3% | 50.1% | 31.7% | 29.7% | 31.7% | 11.4% |
52
+ | DeepSeek v1.5 7B | 65.9% | **70.8%** | **61.2%** | 55.5% | 59.0% | **62.7%** | 60.9% | **33.5%** |
53
+ | **Codestral Mamba (7B)** | **75.0%** | 68.5% | 58.8% | **57.8%** | **59.8%** | 57.0% | **61.5%** | 31.1% |
54
+ |
55
+ | **Codestral (22B)** | **81.1%%** | **78.2%%** | **63.5%%** | 51.3% | **65.2%** | **63.3%** | - | **42.4%** |
56
+ | CodeLlama 34B | 43.3% | 75.1% | 50.8% | 55.2% | 51.6% | 57.0% | 59.0% | 29.7% |
57
+
58
+ ## The Mistral AI Team
59
+
60
+ 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
config.json ADDED
@@ -0,0 +1,12 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "dim": 4096,
3
+ "n_layers": 64,
4
+ "vocab_size": 32768,
5
+ "n_groups": 8,
6
+ "rms_norm": true,
7
+ "residual_in_fp32": true,
8
+ "fused_add_norm": true,
9
+ "pad_vocab_size_multiple": 1,
10
+ "tie_embeddings": false,
11
+ "model_type": "mamba"
12
+ }
model.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:8fe988b5ba989d1e4bddd4b68a6a18672eadd2c00c88f5352b2734a4bb964710
3
+ size 14570874432
tokenizer.model ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:59f95e28944c062244741268596badc900df86c7f5ded05088d2da22a7379e06
3
+ size 587583