File size: 1,293 Bytes
f4272d4 c952f92 f4272d4 5c05a27 f4272d4 4fb59f9 f4272d4 4fb59f9 f4272d4 5c05a27 4fb59f9 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 |
---
base_model: unsloth/mistral-7b-v0.3-bnb-4bit
language:
- en
license: apache-2.0
tags:
- text-generation-inference
- transformers
- unsloth
- mistral
- trl
- sft
---
# Jokestral
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).
So the only purpose of this model is the generation of cringe jokes. </br>
Just write the first few words and get your joke.
# Usage
[**Goodle Colab example**](https://colab.research.google.com/drive/13N1O-fq-vjr8FUrsUU6f24fPpyf0ZwOS#scrollTo=UBSG1UTV85Vq)
```
pip install transformers
pip install --no-deps "trl<0.9.0" peft accelerate bitsandbytes
```
```
from transformers import AutoTokenizer,AutoModelForCausalLM
model = AutoModelForCausalLM.from_pretrained("SantaBot/Jokestral_4bit",)
tokenizer = AutoTokenizer.from_pretrained("SantaBot/Jokestral_4bit")
inputs = tokenizer(
[
"My doctor" # YOUR PROMPT HERE
], return_tensors = "pt").to("cuda")
outputs = model.generate(**inputs, max_new_tokens = 64, use_cache = True)
tokenizer.batch_decode(outputs)
```
**The output should be something like** : </br>
`['<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>']`
|