SantaBot commited on
Commit
236a4f7
·
verified ·
1 Parent(s): 89de314

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +27 -6
README.md CHANGED
@@ -9,14 +9,35 @@ tags:
9
  - unsloth
10
  - mistral
11
  - trl
 
12
  ---
 
13
 
14
- # Uploaded model
 
 
15
 
16
- - **Developed by:** SantaBot
17
- - **License:** apache-2.0
18
- - **Finetuned from model :** unsloth/mistral-7b-v0.3-bnb-4bit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
19
 
20
- This mistral model was trained 2x faster with [Unsloth](https://github.com/unslothai/unsloth) and Huggingface's TRL library.
21
 
22
- [<img src="https://raw.githubusercontent.com/unslothai/unsloth/main/images/unsloth%20made%20with%20love.png" width="200"/>](https://github.com/unslothai/unsloth)
 
9
  - unsloth
10
  - mistral
11
  - trl
12
+ - sft
13
  ---
14
+ # Jokestral
15
 
16
+ This model was created by fine-tuning `unsloth/mistral-7b-v0.3-bnb-4bit` on [Short jokes dataset](https://www.kaggle.com/datasets/abhinavmoudgil95/short-jokes).
17
+ So the only purpose of this model is the generation of cringe jokes. </br>
18
+ Just write the first few words and get your joke.
19
 
20
+ # Usage
21
+
22
+ [**Goodle Colab example**](https://colab.research.google.com/drive/13N1O-fq-vjr8FUrsUU6f24fPpyf0ZwOS#scrollTo=UBSG1UTV85Vq)
23
+
24
+ ```
25
+ pip install transformers
26
+ pip install --no-deps "trl<0.9.0" peft accelerate bitsandbytes
27
+ ```
28
+ ```
29
+ from transformers import AutoTokenizer,AutoModelForCausalLM
30
+ model = AutoModelForCausalLM.from_pretrained("SantaBot/Jokestral_16bit",)
31
+ tokenizer = AutoTokenizer.from_pretrained("SantaBot/Jokestral_16bit")
32
+ inputs = tokenizer(
33
+ [
34
+ "My doctor" # YOUR PROMPT HERE
35
+ ], return_tensors = "pt").to("cuda")
36
+ outputs = model.generate(**inputs, max_new_tokens = 64, use_cache = True)
37
+ tokenizer.batch_decode(outputs)
38
+ ```
39
+
40
+ **The output should be something like** : </br>
41
+ `['<s> My doctor told me I have to stop m4sturb4t1ng. I asked him why and he said ""Because I\'m trying to examine you.""\n</s>']`
42
 
 
43