Spaces:
Paused
Paused
Update app.py
Browse files
app.py
CHANGED
@@ -6,7 +6,7 @@ import torch
|
|
6 |
import gradio as gr
|
7 |
import sentencepiece
|
8 |
|
9 |
-
title = "#
|
10 |
description = """[allenai/tulu-2-dpo-7b](https://huggingface.co/allenai/tulu-2-dpo-7b) and larger Tulu-2 models are Instruct Llama Finetunes using the [mistralai/Mistral-7B](https://huggingface.co/mistralai/Mistral-7B-v0.1) recipe. You can use [allenai/tulu-2-13b](https://huggingface.co/allenai/tulu-2-13b) here via API using Gradio by scrolling down and clicking Use 'Via API' or privately by [cloning this space on huggingface](https://huggingface.co/spaces/Tonic1/TuluDemo?duplicate=true) See also the large model here : [allenai/tulu-2-dpo-70b](https://huggingface.co/allenai/tulu-2-dpo-70b) . [Join my active builders' server on discord](https://discord.gg/VqTxc76K3u). Let's build together!. [Add this Space as a discord bot to your server by clicking this link](https://discord.com/oauth2/authorize?client_id=1176628808212828231&scope=bot+applications.commands&permissions=326417525824). Big thanks to 🤗Huggingface Organisation for the🫂Community Grant"""
|
11 |
|
12 |
os.environ['PYTORCH_CUDA_ALLOC_CONF'] = 'max_split_size_mb:50'
|
@@ -52,7 +52,7 @@ def gradio_predict(user_message, system_message, max_new_tokens, temperature, to
|
|
52 |
Tulu_bot.set_system_message(system_message)
|
53 |
if not do_sample:
|
54 |
max_length = 780
|
55 |
-
temperature =
|
56 |
top_p = 0.9
|
57 |
repetition_penalty = 0.9
|
58 |
response = Tulu_bot.predict(user_message, temperature, max_new_tokens, top_p, repetition_penalty, do_sample)
|
@@ -75,7 +75,7 @@ with gr.Blocks(theme = "ParityError/Anime") as demo:
|
|
75 |
max_new_tokens = gr.Slider(label="Max new tokens", value=780, minimum=550, maximum=3200, step=1)
|
76 |
temperature = gr.Slider(label="Temperature", value=0.3, minimum=0.1, maximum=1.0, step=0.1)
|
77 |
top_p = gr.Slider(label="Top-p (nucleus sampling)", value=0.90, minimum=0.01, maximum=0.99, step=0.05)
|
78 |
-
repetition_penalty = gr.Slider(label="Repetition penalty", value=
|
79 |
|
80 |
submit_button = gr.Button("Submit")
|
81 |
output_text = gr.Textbox(label="🌷Tulu Response")
|
|
|
6 |
import gradio as gr
|
7 |
import sentencepiece
|
8 |
|
9 |
+
title = "# Welcome to 🙋🏻♂️Tonic's🌷Tulu Chat!"
|
10 |
description = """[allenai/tulu-2-dpo-7b](https://huggingface.co/allenai/tulu-2-dpo-7b) and larger Tulu-2 models are Instruct Llama Finetunes using the [mistralai/Mistral-7B](https://huggingface.co/mistralai/Mistral-7B-v0.1) recipe. You can use [allenai/tulu-2-13b](https://huggingface.co/allenai/tulu-2-13b) here via API using Gradio by scrolling down and clicking Use 'Via API' or privately by [cloning this space on huggingface](https://huggingface.co/spaces/Tonic1/TuluDemo?duplicate=true) See also the large model here : [allenai/tulu-2-dpo-70b](https://huggingface.co/allenai/tulu-2-dpo-70b) . [Join my active builders' server on discord](https://discord.gg/VqTxc76K3u). Let's build together!. [Add this Space as a discord bot to your server by clicking this link](https://discord.com/oauth2/authorize?client_id=1176628808212828231&scope=bot+applications.commands&permissions=326417525824). Big thanks to 🤗Huggingface Organisation for the🫂Community Grant"""
|
11 |
|
12 |
os.environ['PYTORCH_CUDA_ALLOC_CONF'] = 'max_split_size_mb:50'
|
|
|
52 |
Tulu_bot.set_system_message(system_message)
|
53 |
if not do_sample:
|
54 |
max_length = 780
|
55 |
+
temperature = 0.9
|
56 |
top_p = 0.9
|
57 |
repetition_penalty = 0.9
|
58 |
response = Tulu_bot.predict(user_message, temperature, max_new_tokens, top_p, repetition_penalty, do_sample)
|
|
|
75 |
max_new_tokens = gr.Slider(label="Max new tokens", value=780, minimum=550, maximum=3200, step=1)
|
76 |
temperature = gr.Slider(label="Temperature", value=0.3, minimum=0.1, maximum=1.0, step=0.1)
|
77 |
top_p = gr.Slider(label="Top-p (nucleus sampling)", value=0.90, minimum=0.01, maximum=0.99, step=0.05)
|
78 |
+
repetition_penalty = gr.Slider(label="Repetition penalty", value=0.9, minimum=0.05, maximum=1.0, step=0.05)
|
79 |
|
80 |
submit_button = gr.Button("Submit")
|
81 |
output_text = gr.Textbox(label="🌷Tulu Response")
|