Transformers
PyTorch
TensorBoard
English
t5
text2text-generation
NLP
ChatBot
Game AI
text-generation-inference
Instructions to use Supiri/t5-base-conversation with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Supiri/t5-base-conversation with Transformers:
# Load model directly from transformers import AutoTokenizer, AutoModelForSeq2SeqLM tokenizer = AutoTokenizer.from_pretrained("Supiri/t5-base-conversation") model = AutoModelForSeq2SeqLM.from_pretrained("Supiri/t5-base-conversation") - Notebooks
- Google Colab
- Kaggle
Update README.md
Browse files
README.md
CHANGED
|
@@ -38,8 +38,8 @@ prompt = "What's your name?"
|
|
| 38 |
|
| 39 |
context = "Hinata was soft-spoken and polite, always addressing people with proper honorifics. She is kind, always thinking of others more than for herself, caring for their feelings and well-being. She doesn't like being confrontational for any reason. This led to her being meek or timid to others, as her overwhelming kindness can render her unable to respond or act for fear of offending somebody."
|
| 40 |
|
| 41 |
-
input_ids = tokenizer(f"personality: {
|
| 42 |
-
outputs = trained_model.generate(input_ids, num_beams=6, diversity_penalty=
|
| 43 |
|
| 44 |
print("Answer:\t", tokenizer.decode(outputs[0], skip_special_tokens=True))
|
| 45 |
|
|
@@ -62,7 +62,7 @@ Which reflect its bio which was filled by GPT-3
|
|
| 62 |
> "He stands primarily to gain self-esteem, which he often receives through the submission of others"
|
| 63 |
|
| 64 |
|
| 65 |
-
In gist, Dr. Greenbaum tried to tease Sebastian about his seductive traits but this model's go-to response was to shut her down since the biography of Sebastian states he often
|
| 66 |
|
| 67 |
```py
|
| 68 |
prompt = dataset['test'][66]['request']
|
|
|
|
| 38 |
|
| 39 |
context = "Hinata was soft-spoken and polite, always addressing people with proper honorifics. She is kind, always thinking of others more than for herself, caring for their feelings and well-being. She doesn't like being confrontational for any reason. This led to her being meek or timid to others, as her overwhelming kindness can render her unable to respond or act for fear of offending somebody."
|
| 40 |
|
| 41 |
+
input_ids = tokenizer(f"personality: {context}", f"inquiry: {prompt}", return_tensors='pt').input_ids
|
| 42 |
+
outputs = trained_model.generate(input_ids, num_beams=6, diversity_penalty=2.5, num_beam_groups=2)
|
| 43 |
|
| 44 |
print("Answer:\t", tokenizer.decode(outputs[0], skip_special_tokens=True))
|
| 45 |
|
|
|
|
| 62 |
> "He stands primarily to gain self-esteem, which he often receives through the submission of others"
|
| 63 |
|
| 64 |
|
| 65 |
+
In gist, Dr. Greenbaum tried to tease Sebastian about his seductive traits but this model's go-to response was to shut her down since the biography of Sebastian states he often tries to assert his dominance over others.
|
| 66 |
|
| 67 |
```py
|
| 68 |
prompt = dataset['test'][66]['request']
|