TechxGenus commited on
Commit
8017c53
1 Parent(s): 5d5123d

Upload folder using huggingface_hub

Browse files
README.md ADDED
@@ -0,0 +1,88 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: apache-2.0
3
+ ---
4
+
5
+ AWQ quantized version of Mistral-7B-v0.3 model.
6
+
7
+ ---
8
+
9
+ # Model Card for Mistral-7B-v0.3
10
+
11
+ The Mistral-7B-v0.3 Large Language Model (LLM) is a Mistral-7B-v0.2 with extended vocabulary.
12
+
13
+ Mistral-7B-v0.3 has the following changes compared to [Mistral-7B-v0.2](https://huggingface.co/mistralai/Mistral-7B-v0.2/edit/main/README.md)
14
+ - Extended vocabulary to 32768
15
+
16
+ ## Installation
17
+
18
+ It is recommended to use `mistralai/Mistral-7B-v0.3` with [mistral-inference](https://github.com/mistralai/mistral-inference). For HF transformers code snippets, please keep scrolling.
19
+
20
+ ```
21
+ pip install mistral_inference
22
+ ```
23
+
24
+ ## Download
25
+
26
+ ```py
27
+ from huggingface_hub import snapshot_download
28
+ from pathlib import Path
29
+
30
+ mistral_models_path = Path.home().joinpath('mistral_models', '7B-v0.3')
31
+ mistral_models_path.mkdir(parents=True, exist_ok=True)
32
+
33
+ snapshot_download(repo_id="mistralai/Mistral-7B-v0.3", allow_patterns=["params.json", "consolidated.safetensors", "tokenizer.model.v3"], local_dir=mistral_models_path)
34
+ ```
35
+
36
+ ### Demo
37
+
38
+ After installing `mistral_inference`, a `mistral-demo` CLI command should be available in your environment.
39
+
40
+ ```
41
+ mistral-demo $HOME/mistral_models/7B-v0.3
42
+ ```
43
+
44
+ Should give something along the following lines:
45
+
46
+ ```
47
+ This is a test of the emergency broadcast system. This is only a test.
48
+
49
+ If this were a real emergency, you would be told what to do.
50
+
51
+ This is a test
52
+ =====================
53
+ This is another test of the new blogging software. I’m not sure if I’m going to keep it or not. I’m not sure if I’m going to keep
54
+ =====================
55
+ This is a third test, mistral AI is very good at testing. 🙂
56
+
57
+ This is a third test, mistral AI is very good at testing. 🙂
58
+
59
+ This
60
+ =====================
61
+ ```
62
+
63
+ ## Generate with `transformers`
64
+
65
+ If you want to use Hugging Face `transformers` to generate text, you can do something like this.
66
+
67
+ ```py
68
+ from transformers import AutoModelForCausalLM, AutoTokenizer
69
+
70
+ model_id = "mistralai/Mistral-7B-v0.3"
71
+ tokenizer = AutoTokenizer.from_pretrained(model_id)
72
+
73
+ model = AutoModelForCausalLM.from_pretrained(model_id)
74
+ inputs = tokenizer("Hello my name is", return_tensors="pt")
75
+
76
+ outputs = model.generate(**inputs, max_new_tokens=20)
77
+ print(tokenizer.decode(outputs[0], skip_special_tokens=True))
78
+ ```
79
+
80
+ ## Limitations
81
+
82
+ The Mistral 7B Instruct model is a quick demonstration that the base model can be easily fine-tuned to achieve compelling performance.
83
+ It does not have any moderation mechanisms. We're looking forward to engaging with the community on ways to
84
+ make the model finely respect guardrails, allowing for deployment in environments requiring moderated outputs.
85
+
86
+ ## The Mistral AI Team
87
+
88
+ Albert Jiang, Alexandre Sablayrolles, Alexis Tacnet, Antoine Roux, Arthur Mensch, Audrey Herblin-Stoop, Baptiste Bout, Baudouin de Monicault, Blanche Savary, Bam4d, Caroline Feldman, Devendra Singh Chaplot, Diego de las Casas, Eleonore Arcelin, Emma Bou Hanna, Etienne Metzger, Gianna Lengyel, Guillaume Bour, Guillaume Lample, Harizo Rajaona, Jean-Malo Delignon, Jia Li, Justus Murke, Louis Martin, Louis Ternon, Lucile Saulnier, Lélio Renard Lavaud, Margaret Jennings, Marie Pellat, Marie Torelli, Marie-Anne Lachaux, Nicolas Schuhl, Patrick von Platen, Pierre Stock, Sandeep Subramanian, Sophia Yang, Szymon Antoniak, Teven Le Scao, Thibaut Lavril, Timothée Lacroix, Théophile Gervet, Thomas Wang, Valera Nemychnikova, William El Sayed, William Marshall
config.json ADDED
@@ -0,0 +1,34 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "_name_or_path": "mistralai/Mistral-7B-v0.3",
3
+ "architectures": [
4
+ "MistralForCausalLM"
5
+ ],
6
+ "attention_dropout": 0.0,
7
+ "bos_token_id": 1,
8
+ "eos_token_id": 2,
9
+ "hidden_act": "silu",
10
+ "hidden_size": 4096,
11
+ "initializer_range": 0.02,
12
+ "intermediate_size": 14336,
13
+ "max_position_embeddings": 32768,
14
+ "model_type": "mistral",
15
+ "num_attention_heads": 32,
16
+ "num_hidden_layers": 32,
17
+ "num_key_value_heads": 8,
18
+ "quantization_config": {
19
+ "bits": 4,
20
+ "group_size": 128,
21
+ "modules_to_not_convert": null,
22
+ "quant_method": "awq",
23
+ "version": "gemm",
24
+ "zero_point": true
25
+ },
26
+ "rms_norm_eps": 1e-05,
27
+ "rope_theta": 1000000.0,
28
+ "sliding_window": null,
29
+ "tie_word_embeddings": false,
30
+ "torch_dtype": "float16",
31
+ "transformers_version": "4.40.0",
32
+ "use_cache": true,
33
+ "vocab_size": 32768
34
+ }
generation_config.json ADDED
@@ -0,0 +1,7 @@
 
 
 
 
 
 
 
 
1
+ {
2
+ "_from_model_config": true,
3
+ "bos_token_id": 1,
4
+ "do_sample": true,
5
+ "eos_token_id": 2,
6
+ "transformers_version": "4.40.0"
7
+ }
model.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:3624e38b581dceba4aac5ed840a993e856c7a91bd5e5b8935b03d4d2721443e3
3
+ size 4163463144
special_tokens_map.json ADDED
@@ -0,0 +1,23 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "bos_token": {
3
+ "content": "<s>",
4
+ "lstrip": false,
5
+ "normalized": false,
6
+ "rstrip": false,
7
+ "single_word": false
8
+ },
9
+ "eos_token": {
10
+ "content": "</s>",
11
+ "lstrip": false,
12
+ "normalized": false,
13
+ "rstrip": false,
14
+ "single_word": false
15
+ },
16
+ "unk_token": {
17
+ "content": "<unk>",
18
+ "lstrip": false,
19
+ "normalized": false,
20
+ "rstrip": false,
21
+ "single_word": false
22
+ }
23
+ }
tokenizer.json ADDED
The diff for this file is too large to render. See raw diff
 
tokenizer.model ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:37f00374dea48658ee8f5d0f21895b9bc55cb0103939607c8185bfd1c6ca1f89
3
+ size 587404
tokenizer_config.json ADDED
The diff for this file is too large to render. See raw diff