Commit
·
4dc49d1
1
Parent(s):
e64d5d5
Update model IDs and system prompt in app.py, add autoawq to requirements.txt
Browse files- app.py +4 -4
- requirements.txt +2 -1
app.py
CHANGED
@@ -3,8 +3,8 @@ import torch
|
|
3 |
import gradio as gr
|
4 |
from threading import Thread
|
5 |
|
6 |
-
base_model_id = "
|
7 |
-
new_model_id = "MohamedRashad/Arabic-Orpo-Llama-3-8B-Instruct"
|
8 |
|
9 |
# Reload tokenizer and model
|
10 |
tokenizer = AutoTokenizer.from_pretrained(base_model_id)
|
@@ -108,9 +108,9 @@ def clear():
|
|
108 |
with gr.Blocks(title="Arabic-ORPO-Llama3") as demo:
|
109 |
with gr.Column():
|
110 |
gr.HTML("<center><h1>Arabic Chatbot Comparison</h1></center>")
|
111 |
-
system_prompt = gr.Textbox(lines=1, label="System Prompt", value="
|
112 |
with gr.Row(variant="panel"):
|
113 |
-
base_chatbot = gr.Chatbot(label=base_model_id, rtl=
|
114 |
new_chatbot = gr.Chatbot(label=new_model_id, rtl=True, likeable=True, show_copy_button=True)
|
115 |
with gr.Row(variant="panel"):
|
116 |
with gr.Column(scale=1):
|
|
|
3 |
import gradio as gr
|
4 |
from threading import Thread
|
5 |
|
6 |
+
base_model_id = "YurtsAI/Meta-Llama-3-8B-Instruct-AWQ"
|
7 |
+
new_model_id = "MohamedRashad/Arabic-Orpo-Llama-3-8B-Instruct-AWQ"
|
8 |
|
9 |
# Reload tokenizer and model
|
10 |
tokenizer = AutoTokenizer.from_pretrained(base_model_id)
|
|
|
108 |
with gr.Blocks(title="Arabic-ORPO-Llama3") as demo:
|
109 |
with gr.Column():
|
110 |
gr.HTML("<center><h1>Arabic Chatbot Comparison</h1></center>")
|
111 |
+
system_prompt = gr.Textbox(lines=1, label="System Prompt", value="أنت متحدث لبق باللغة العربية!", rtl=True, text_align="right", show_copy_button=True)
|
112 |
with gr.Row(variant="panel"):
|
113 |
+
base_chatbot = gr.Chatbot(label=base_model_id, rtl=True, likeable=True, show_copy_button=True)
|
114 |
new_chatbot = gr.Chatbot(label=new_model_id, rtl=True, likeable=True, show_copy_button=True)
|
115 |
with gr.Row(variant="panel"):
|
116 |
with gr.Column(scale=1):
|
requirements.txt
CHANGED
@@ -1,3 +1,4 @@
|
|
1 |
transformers
|
2 |
torch
|
3 |
-
accelerate
|
|
|
|
1 |
transformers
|
2 |
torch
|
3 |
+
accelerate
|
4 |
+
autoawq
|