Update README.md
Browse files
README.md
CHANGED
@@ -1,3 +1,104 @@
|
|
1 |
-
---
|
2 |
-
license: apache-2.0
|
3 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
---
|
2 |
+
license: apache-2.0
|
3 |
+
datasets:
|
4 |
+
- cognitivecomputations/Dolphin-2.9
|
5 |
+
---
|
6 |
+
# Wukong-Mistral-7B-v0.3
|
7 |
+
|
8 |
+
![image/jpeg](https://cdn-uploads.huggingface.co/production/uploads/655dc641accde1bbc8b41aec/xOe1Nb3S9Nb53us7_Ja3s.jpeg)
|
9 |
+
|
10 |
+
|
11 |
+
Join Our Discord! https://discord.gg/cognitivecomputations
|
12 |
+
|
13 |
+
Wukong-Mistral-7B-v0.3 is a dealigned chat finetune of the original Mistral v0.3 base model.
|
14 |
+
|
15 |
+
This model was trained on a selection of datasets from Cognitive Computations Dolphin 2.9 https://erichartford.com/dolphin 🐬
|
16 |
+
|
17 |
+
This model was trained for 3 epochs.
|
18 |
+
|
19 |
+
# Example Outputs
|
20 |
+
|
21 |
+
TBD
|
22 |
+
|
23 |
+
# Original Model Card Below
|
24 |
+
|
25 |
+
# Model Card for Mistral-7B-v0.3
|
26 |
+
|
27 |
+
The Mistral-7B-v0.3 Large Language Model (LLM) is a Mistral-7B-v0.2 with extended vocabulary.
|
28 |
+
|
29 |
+
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)
|
30 |
+
- Extended vocabulary to 32768
|
31 |
+
|
32 |
+
## Installation
|
33 |
+
|
34 |
+
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.
|
35 |
+
|
36 |
+
```
|
37 |
+
pip install mistral_inference
|
38 |
+
```
|
39 |
+
|
40 |
+
## Download
|
41 |
+
|
42 |
+
```py
|
43 |
+
from huggingface_hub import snapshot_download
|
44 |
+
from pathlib import Path
|
45 |
+
|
46 |
+
mistral_models_path = Path.home().joinpath('mistral_models', '7B-v0.3')
|
47 |
+
mistral_models_path.mkdir(parents=True, exist_ok=True)
|
48 |
+
|
49 |
+
snapshot_download(repo_id="mistralai/Mistral-7B-v0.3", allow_patterns=["params.json", "consolidated.safetensors", "tokenizer.model.v3"], local_dir=mistral_models_path)
|
50 |
+
```
|
51 |
+
|
52 |
+
### Demo
|
53 |
+
|
54 |
+
After installing `mistral_inference`, a `mistral-demo` CLI command should be available in your environment.
|
55 |
+
|
56 |
+
```
|
57 |
+
mistral-demo $HOME/mistral_models/7B-v0.3
|
58 |
+
```
|
59 |
+
|
60 |
+
Should give something along the following lines:
|
61 |
+
|
62 |
+
```
|
63 |
+
This is a test of the emergency broadcast system. This is only a test.
|
64 |
+
|
65 |
+
If this were a real emergency, you would be told what to do.
|
66 |
+
|
67 |
+
This is a test
|
68 |
+
=====================
|
69 |
+
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
|
70 |
+
=====================
|
71 |
+
This is a third test, mistral AI is very good at testing. 🙂
|
72 |
+
|
73 |
+
This is a third test, mistral AI is very good at testing. 🙂
|
74 |
+
|
75 |
+
This
|
76 |
+
=====================
|
77 |
+
```
|
78 |
+
|
79 |
+
## Generate with `transformers`
|
80 |
+
|
81 |
+
If you want to use Hugging Face `transformers` to generate text, you can do something like this.
|
82 |
+
|
83 |
+
```py
|
84 |
+
from transformers import AutoModelForCausalLM, AutoTokenizer
|
85 |
+
|
86 |
+
model_id = "mistralai/Mistral-7B-v0.3"
|
87 |
+
tokenizer = AutoTokenizer.from_pretrained(model_id)
|
88 |
+
|
89 |
+
model = AutoModelForCausalLM.from_pretrained(model_id)
|
90 |
+
inputs = tokenizer("Hello my name is", return_tensors="pt")
|
91 |
+
|
92 |
+
outputs = model.generate(**inputs, max_new_tokens=20)
|
93 |
+
print(tokenizer.decode(outputs[0], skip_special_tokens=True))
|
94 |
+
```
|
95 |
+
|
96 |
+
## Limitations
|
97 |
+
|
98 |
+
The Mistral 7B Instruct model is a quick demonstration that the base model can be easily fine-tuned to achieve compelling performance.
|
99 |
+
It does not have any moderation mechanisms. We're looking forward to engaging with the community on ways to
|
100 |
+
make the model finely respect guardrails, allowing for deployment in environments requiring moderated outputs.
|
101 |
+
|
102 |
+
## The Mistral AI Team
|
103 |
+
|
104 |
+
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
|