typeof commited on
Commit
e09e87f
1 Parent(s): 47154cd
This view is limited to 50 files because it contains too many changes.   See raw diff
Files changed (50) hide show
  1. README.md +87 -0
  2. config.json +24 -0
  3. generation_config.json +6 -0
  4. model-00001-of-00291.safetensors +3 -0
  5. model-00002-of-00291.safetensors +3 -0
  6. model-00003-of-00291.safetensors +3 -0
  7. model-00004-of-00291.safetensors +3 -0
  8. model-00005-of-00291.safetensors +3 -0
  9. model-00006-of-00291.safetensors +3 -0
  10. model-00007-of-00291.safetensors +3 -0
  11. model-00008-of-00291.safetensors +3 -0
  12. model-00009-of-00291.safetensors +3 -0
  13. model-00010-of-00291.safetensors +3 -0
  14. model-00011-of-00291.safetensors +3 -0
  15. model-00012-of-00291.safetensors +3 -0
  16. model-00013-of-00291.safetensors +3 -0
  17. model-00014-of-00291.safetensors +3 -0
  18. model-00015-of-00291.safetensors +3 -0
  19. model-00016-of-00291.safetensors +3 -0
  20. model-00017-of-00291.safetensors +3 -0
  21. model-00018-of-00291.safetensors +3 -0
  22. model-00019-of-00291.safetensors +3 -0
  23. model-00020-of-00291.safetensors +3 -0
  24. model-00021-of-00291.safetensors +3 -0
  25. model-00022-of-00291.safetensors +3 -0
  26. model-00023-of-00291.safetensors +3 -0
  27. model-00024-of-00291.safetensors +3 -0
  28. model-00025-of-00291.safetensors +3 -0
  29. model-00026-of-00291.safetensors +3 -0
  30. model-00027-of-00291.safetensors +3 -0
  31. model-00028-of-00291.safetensors +3 -0
  32. model-00029-of-00291.safetensors +3 -0
  33. model-00030-of-00291.safetensors +3 -0
  34. model-00031-of-00291.safetensors +3 -0
  35. model-00032-of-00291.safetensors +3 -0
  36. model-00033-of-00291.safetensors +3 -0
  37. model-00034-of-00291.safetensors +3 -0
  38. model-00035-of-00291.safetensors +3 -0
  39. model-00036-of-00291.safetensors +3 -0
  40. model-00037-of-00291.safetensors +3 -0
  41. model-00038-of-00291.safetensors +3 -0
  42. model-00039-of-00291.safetensors +3 -0
  43. model-00040-of-00291.safetensors +3 -0
  44. model-00041-of-00291.safetensors +3 -0
  45. model-00042-of-00291.safetensors +3 -0
  46. model-00043-of-00291.safetensors +3 -0
  47. model-00044-of-00291.safetensors +3 -0
  48. model-00045-of-00291.safetensors +3 -0
  49. model-00046-of-00291.safetensors +3 -0
  50. model-00047-of-00291.safetensors +3 -0
README.md ADDED
@@ -0,0 +1,87 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: apache-2.0
3
+ pipeline_tag: text-generation
4
+ tags:
5
+ - finetuned
6
+ inference:
7
+ parameters:
8
+ temperature: 0.7
9
+ ---
10
+
11
+ # Model Card for Mistral-7B-Instruct-v0.1
12
+
13
+ The Mistral-7B-Instruct-v0.1 Large Language Model (LLM) is a instruct fine-tuned version of the [Mistral-7B-v0.1](https://huggingface.co/mistralai/Mistral-7B-v0.1) generative text model using a variety of publicly available conversation datasets.
14
+
15
+ For full details of this model please read our [paper](https://arxiv.org/abs/2310.06825) and [release blog post](https://mistral.ai/news/announcing-mistral-7b/).
16
+
17
+ ## Instruction format
18
+
19
+ In order to leverage instruction fine-tuning, your prompt should be surrounded by `[INST]` and `[/INST]` tokens. The very first instruction should begin with a begin of sentence id. The next instructions should not. The assistant generation will be ended by the end-of-sentence token id.
20
+
21
+ E.g.
22
+ ```
23
+ text = "<s>[INST] What is your favourite condiment? [/INST]"
24
+ "Well, I'm quite partial to a good squeeze of fresh lemon juice. It adds just the right amount of zesty flavour to whatever I'm cooking up in the kitchen!</s> "
25
+ "[INST] Do you have mayonnaise recipes? [/INST]"
26
+ ```
27
+
28
+ This format is available as a [chat template](https://huggingface.co/docs/transformers/main/chat_templating) via the `apply_chat_template()` method:
29
+
30
+ ```python
31
+ from transformers import AutoModelForCausalLM, AutoTokenizer
32
+
33
+ device = "cuda" # the device to load the model onto
34
+
35
+ model = AutoModelForCausalLM.from_pretrained("mistralai/Mistral-7B-Instruct-v0.1")
36
+ tokenizer = AutoTokenizer.from_pretrained("mistralai/Mistral-7B-Instruct-v0.1")
37
+
38
+ messages = [
39
+ {"role": "user", "content": "What is your favourite condiment?"},
40
+ {"role": "assistant", "content": "Well, I'm quite partial to a good squeeze of fresh lemon juice. It adds just the right amount of zesty flavour to whatever I'm cooking up in the kitchen!"},
41
+ {"role": "user", "content": "Do you have mayonnaise recipes?"}
42
+ ]
43
+
44
+ encodeds = tokenizer.apply_chat_template(messages, return_tensors="pt")
45
+
46
+ model_inputs = encodeds.to(device)
47
+ model.to(device)
48
+
49
+ generated_ids = model.generate(model_inputs, max_new_tokens=1000, do_sample=True)
50
+ decoded = tokenizer.batch_decode(generated_ids)
51
+ print(decoded[0])
52
+ ```
53
+
54
+ ## Model Architecture
55
+ This instruction model is based on Mistral-7B-v0.1, a transformer model with the following architecture choices:
56
+ - Grouped-Query Attention
57
+ - Sliding-Window Attention
58
+ - Byte-fallback BPE tokenizer
59
+
60
+ ## Troubleshooting
61
+ - If you see the following error:
62
+ ```
63
+ Traceback (most recent call last):
64
+ File "", line 1, in
65
+ File "/transformers/models/auto/auto_factory.py", line 482, in from_pretrained
66
+ config, kwargs = AutoConfig.from_pretrained(
67
+ File "/transformers/models/auto/configuration_auto.py", line 1022, in from_pretrained
68
+ config_class = CONFIG_MAPPING[config_dict["model_type"]]
69
+ File "/transformers/models/auto/configuration_auto.py", line 723, in getitem
70
+ raise KeyError(key)
71
+ KeyError: 'mistral'
72
+ ```
73
+
74
+ Installing transformers from source should solve the issue
75
+ pip install git+https://github.com/huggingface/transformers
76
+
77
+ This should not be required after transformers-v4.33.4.
78
+
79
+ ## Limitations
80
+
81
+ The Mistral 7B Instruct model is a quick demonstration that the base model can be easily fine-tuned to achieve compelling performance.
82
+ It does not have any moderation mechanisms. We're looking forward to engaging with the community on ways to
83
+ make the model finely respect guardrails, allowing for deployment in environments requiring moderated outputs.
84
+
85
+ ## The Mistral AI Team
86
+
87
+ Albert Jiang, Alexandre Sablayrolles, Arthur Mensch, Chris Bamford, Devendra Singh Chaplot, Diego de las Casas, Florian Bressand, Gianna Lengyel, Guillaume Lample, Lélio Renard Lavaud, Lucile Saulnier, Marie-Anne Lachaux, Pierre Stock, Teven Le Scao, Thibaut Lavril, Thomas Wang, Timothée Lacroix, William El Sayed.
config.json ADDED
@@ -0,0 +1,24 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "architectures": [
3
+ "MistralForCausalLM"
4
+ ],
5
+ "bos_token_id": 1,
6
+ "eos_token_id": 2,
7
+ "hidden_act": "silu",
8
+ "hidden_size": 4096,
9
+ "initializer_range": 0.02,
10
+ "intermediate_size": 14336,
11
+ "max_position_embeddings": 32768,
12
+ "model_type": "mistral",
13
+ "num_attention_heads": 32,
14
+ "num_hidden_layers": 32,
15
+ "num_key_value_heads": 8,
16
+ "rms_norm_eps": 1e-05,
17
+ "rope_theta": 10000.0,
18
+ "sliding_window": 4096,
19
+ "tie_word_embeddings": false,
20
+ "torch_dtype": "bfloat16",
21
+ "transformers_version": "4.34.0.dev0",
22
+ "use_cache": true,
23
+ "vocab_size": 32000
24
+ }
generation_config.json ADDED
@@ -0,0 +1,6 @@
 
 
 
 
 
 
 
1
+ {
2
+ "_from_model_config": true,
3
+ "bos_token_id": 1,
4
+ "eos_token_id": 2,
5
+ "transformers_version": "4.34.0.dev0"
6
+ }
model-00001-of-00291.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:8045e2f007a82d47896434f40e7453fe066145471747e2ffc8bfc7f34c879695
3
+ size 262144136
model-00002-of-00291.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:00b6e06f870a24a8490bb819a49c8d96b795e0665094eae46ab0d3da5c722829
3
+ size 33554584
model-00003-of-00291.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:e1b8c7e3ed72869b8b4b0ed4ec28aa70aaafca2e7e6b278d20352f3abe2e3a93
3
+ size 8388760
model-00004-of-00291.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:4c63e0b65977c6a75e1f31a25b80b7e3dd559dd7cbab3bd7069fc4889f71b693
3
+ size 8388760
model-00005-of-00291.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:4649e850a66a12741967dbd289379a5e7521f244f8a8781fc5d131bbe9322feb
3
+ size 33554584
model-00006-of-00291.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:54172ec71f012015f948c5a854ca1a6d4ce2a9da32a0894eef64630f2ede50c6
3
+ size 117440664
model-00007-of-00291.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:db34e4c2062d03ffb174bd91a48f68a5e197ffa15d4089f3e65d21b2f9542bd9
3
+ size 117440656
model-00008-of-00291.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:2ca92291990d1c1b21ba2b18228ee94db5ae5be4a4f1cfeb59dfade99642abf8
3
+ size 117440664
model-00009-of-00291.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:c619a132aa92057efd638a255e58d36c6fa677783c981bb39d699c56a81b820b
3
+ size 8328
model-00010-of-00291.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:5f29b9467109a7dd13de6090368d6fcef2c041871ada9d057b830977c88d6a29
3
+ size 8344
model-00011-of-00291.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:dc2663a5451c8519633c7c47b400d9ff9d9b28d3dc7973e8bf39b9464be808ad
3
+ size 33554584
model-00012-of-00291.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:9613b85feba7ed2452a9a2853aa934dd11d3316c99cb1a9f736f943134365581
3
+ size 8388760
model-00013-of-00291.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:5f9a845417e63f45b86331aa76077715ddc7dc4ccb3517a8ce9e88f653a2ffc2
3
+ size 8388760
model-00014-of-00291.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:1e39d5f51f3581f2202601d029ee7afce75518e478214bb839c48261ca155f93
3
+ size 33554584
model-00015-of-00291.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:febfd8576c4bc9ce3991f96c907c279077698ff61acdbc797bb9c69ca9797890
3
+ size 117440664
model-00016-of-00291.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:e5835832fe72ea2e687a2908d6ab4cd9e52e30eea3e2bf9411c500554cd2bbe6
3
+ size 117440656
model-00017-of-00291.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:851ec593674333f407fd0e1b9ecf777f7c5a310123f15c0d71e2fd327a43f702
3
+ size 117440664
model-00018-of-00291.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:ab3a6e05088268fea5ebb055e62de5b1650689da909c93b41addeb9b6830a63a
3
+ size 8328
model-00019-of-00291.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:1525e4c2c60baab8ded8fc952ce4ef8e51c1f893a207201d27a38f98960c9e92
3
+ size 8344
model-00020-of-00291.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:ae74e46257ad9f56ca5c831bb96c6f1ff6edf96a00926a46b395f8b0f0ab0eec
3
+ size 33554584
model-00021-of-00291.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:357cce0bf993723ef3deb376f34b30018abfe2e82e0198f1ea175cc53fa68e9f
3
+ size 8388760
model-00022-of-00291.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:b7bede51f407defff7ac1f59521cc57a439a3fc0a420792f5e3afaa75d7b026d
3
+ size 8388760
model-00023-of-00291.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:62dd237e8d9b20d9b1e3e9aa10425ca719e2e7558de6a5c3b3533a2f2380ce2a
3
+ size 33554584
model-00024-of-00291.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:5050bf9151da0fae69c6c4f8224dc75e95e9a7540a54e95e88240c24ec735d11
3
+ size 117440664
model-00025-of-00291.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:1993bea86f9b0d7cdcb83d32b952066af6e9651075d039266edfdaea937b1810
3
+ size 117440656
model-00026-of-00291.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:3118cc6ea1fc2494bd79cd87072a674a9258c2dccc18946942686d4605cdd26a
3
+ size 117440664
model-00027-of-00291.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:029e07197ab31d613e20e01e69e77734b6f7e3a9598bd9d94882a942b8c0bf7d
3
+ size 8328
model-00028-of-00291.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:fdf8c732dc3685033ddcd28791745613e88568c861c36f9150eb75cf30e9d542
3
+ size 8344
model-00029-of-00291.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:795188e110d0524fe2dedaa9aa26dd771d7c54c0d08e47b762c19429eba64767
3
+ size 33554584
model-00030-of-00291.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:d8294ed708beb75f8a5777de323303d279d77ede76166c55df029445ea4b498f
3
+ size 8388760
model-00031-of-00291.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:593db9876ffaa6b206f77a1e37be7e4961143ebaedf4ac393a5b7fa71280f28f
3
+ size 8388760
model-00032-of-00291.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:7b826e22ffb40c4e685fe62c76dc2b7440622ff51c7c7e08504796cfa8e2cb17
3
+ size 33554584
model-00033-of-00291.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:a3f39d09ea5afa54dc239b52dfa19ca6b3a8fd5de2a17dfac1a0916cabaeefd6
3
+ size 117440664
model-00034-of-00291.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:b3fbb4366822d57caef69dc80215f0f375c77a50ebb9f4bc3fab056ed4a8e173
3
+ size 117440656
model-00035-of-00291.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:c9479640425dc5d92aa2b56406cda6f466fb5aef699a9e09002cb0d1a560b273
3
+ size 117440664
model-00036-of-00291.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:33d8e9e6978d6afe968e3016cde7f7cb7817165d7e3e0117a8adeef0e5c03ac2
3
+ size 8328
model-00037-of-00291.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:f7656ae76eff302b43a6a7adc176579afd0e03da7d512ea291ab4bbacfc47dd9
3
+ size 8344
model-00038-of-00291.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:8beef3fb34fbb2a0a38862fe2ea036a4e3622e659fe1e370ba8188e74650e841
3
+ size 33554584
model-00039-of-00291.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:85d4c7f0e151fa54a00a50215b9b8ab35711bc7bd01ed99ea26e920f772a4eb6
3
+ size 8388760
model-00040-of-00291.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:7e241cf6a5e018a8276a76b945ce07f79e80afe38bf171a381452193f40d91cc
3
+ size 8388760
model-00041-of-00291.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:3a592f60f69447af289aca4f70ba8923588b4910360968b35a7c1f7d7b0cf866
3
+ size 33554584
model-00042-of-00291.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:b39e2d4823967feeb446f37975d3d46b02ddd0cb992ea7e57586bf6449747095
3
+ size 117440664
model-00043-of-00291.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:29e813bac0ea23425b60ca5ecd8f169c697840cb06b1aa6a578e63a78297e880
3
+ size 117440656
model-00044-of-00291.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:d1b9c7936680160f313602ae5946d8606f9d12e00b808484a745ce520ecff5eb
3
+ size 117440664
model-00045-of-00291.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:bc120b0a32b808f26aaa61a7f7e002ca5a610c5abf1d7ba419d50f3ca4d863c9
3
+ size 8328
model-00046-of-00291.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:59756525401ba52b194f3eef5bd4a11d8f54acd524f9b6a883f087ee889946cc
3
+ size 8344
model-00047-of-00291.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:944c28fa6d9c38a457b274b9c91bee65de629b92ddc9012873aa6511364d5438
3
+ size 33554584