ariG23498 commited on
Commit
e8fce12
1 Parent(s): 5018752

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +24 -31
README.md CHANGED
@@ -7,41 +7,34 @@ model-index:
7
  results: []
8
  ---
9
 
10
- <!-- This model card has been generated automatically according to the information Keras had access to. You should
11
- probably proofread and complete it, then remove this comment. -->
12
 
13
- # Mistral-7B-Instruct-v0.3
 
 
 
 
 
14
 
15
- This model is a fine-tuned version of [ariG23498/Mistral-7B-Instruct-v0.3](https://huggingface.co/ariG23498/Mistral-7B-Instruct-v0.3) on an unknown dataset.
16
- It achieves the following results on the evaluation set:
17
 
 
 
 
 
18
 
19
- ## Model description
 
 
 
 
20
 
21
- More information needed
22
 
23
- ## Intended uses & limitations
24
 
25
- More information needed
26
-
27
- ## Training and evaluation data
28
-
29
- More information needed
30
-
31
- ## Training procedure
32
-
33
- ### Training hyperparameters
34
-
35
- The following hyperparameters were used during training:
36
- - optimizer: None
37
- - training_precision: float32
38
-
39
- ### Training results
40
-
41
-
42
-
43
- ### Framework versions
44
-
45
- - Transformers 4.42.0.dev0
46
- - TensorFlow 2.11.0
47
- - Tokenizers 0.19.1
 
7
  results: []
8
  ---
9
 
10
+ Turns out that [Mistral-7B-Instruct-v0.3](https://huggingface.co/mistralai/Mistral-7B-Instruct-v0.3) only have safetensors. This repo
11
+ is created to have the `.bin` files of the model.
12
 
13
+ This repo is created by:
14
+ ```py
15
+ model_id = "mistralai/Mistral-7B-Instruct-v0.3"
16
+ model = AutoModelForCausalLM.from_pretrained(model_id)
17
+ model.push_to_hub("ariG23498/Mistral-7B-Instruct-v0.3", safe_serialization=False)
18
+ ```
19
 
20
+ This is due to the fact that the TensorFlow port cannot use safetensors and need bin files.
 
21
 
22
+ You can use this model with TF like so:
23
+ ```py
24
+ model_tf = TFAutoModelForCausalLM.from_pretrained("ariG23498/Mistral-7B-Instruct-v0.3", from_pt=True)
25
+ tokenizer = AutoTokenizer.from_pretrained("mistralai/Mistral-7B-Instruct-v0.3")
26
 
27
+ prompt = "My favourite condiment is"
28
+ model_inputs = tokenizer([prompt], return_tensors="tf")
29
+ generated_ids = model_tf.generate(**model_inputs, max_new_tokens=100, do_sample=True)
30
+ tokenizer.batch_decode(generated_ids)[0]
31
+ ```
32
 
33
+ As soon as the safetensors and TensorFlow issue is sorted one can ditch this repository and use the official repository!
34
 
35
+ Update:
36
 
37
+ I have uploaded the `.h5` models as well. You can now use the following and make the entire code work!
38
+ ```py
39
+ model_tf = TFAutoModelForCausalLM.from_pretrained("ariG23498/Mistral-7B-Instruct-v0.3")
40
+ ```