legolasyiu commited on
Commit
bbea92b
1 Parent(s): a2905ab

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +34 -0
README.md CHANGED
@@ -41,6 +41,40 @@ Mistral Nemo is a transformer model, with the following architecture choices:
41
  - **Vocabulary size:** 2**17 ~= 128k
42
  - **Rotary embeddings (theta = 1M)**
43
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
44
 
45
  # Uploaded model
46
 
 
41
  - **Vocabulary size:** 2**17 ~= 128k
42
  - **Rotary embeddings (theta = 1M)**
43
 
44
+ ### Mistral Inference
45
+
46
+
47
+ #### Install
48
+
49
+ It is recommended to use `mistralai/Mistral-Nemo-Base-2407` with [mistral-inference](https://github.com/mistralai/mistral-inference).
50
+ For HF transformers code snippets, please keep scrolling.
51
+
52
+ ```
53
+ pip install mistral_inference
54
+ ```
55
+
56
+ ### Transformers
57
+
58
+ > [!IMPORTANT]
59
+ > NOTE: Until a new release has been made, you need to install transformers from source:
60
+ > ```sh
61
+ > pip install git+https://github.com/huggingface/transformers.git
62
+ > ```
63
+
64
+ If you want to use Hugging Face `transformers` to generate text, you can do something like this.
65
+
66
+ ```py
67
+ from transformers import AutoModelForCausalLM, AutoTokenizer
68
+ model_id = "EpistemeAI2/Fireball-Mistral-Nemo-12B-Philos"
69
+ tokenizer = AutoTokenizer.from_pretrained(model_id)
70
+ model = AutoModelForCausalLM.from_pretrained(model_id)
71
+ inputs = tokenizer("Hello my name is", return_tensors="pt")
72
+ outputs = model.generate(**inputs, max_new_tokens=20)
73
+ print(tokenizer.decode(outputs[0], skip_special_tokens=True))
74
+ ```
75
+
76
+ > [!TIP]
77
+ > Unlike previous Mistral models, Mistral Nemo requires smaller temperatures. We recommend to use a temperature of 0.3.
78
 
79
  # Uploaded model
80