Spaces:
Running
Running
a100 kh
commited on
Commit
•
e92d2df
1
Parent(s):
111fd97
setup
Browse files- .gitignore +1 -0
- local/hf_upload.py +28 -0
- local/leaderboard +21 -0
- local/local_setup +11 -9
- serve/gradio_block_arena_named.py +1 -1
- serve/gradio_web_server.py +9 -9
.gitignore
ADDED
@@ -0,0 +1 @@
|
|
|
|
|
1 |
+
*-conv.json
|
local/hf_upload.py
ADDED
@@ -0,0 +1,28 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# %%
|
2 |
+
import pandas as pd
|
3 |
+
import pickle
|
4 |
+
import datasets
|
5 |
+
# ファイルパスを指定
|
6 |
+
file_path = 'elo_results.pkl'
|
7 |
+
|
8 |
+
# 'rb'は「バイナリ読み込みモード」を意味します
|
9 |
+
with open(file_path, 'rb') as file:
|
10 |
+
# pickleを使用してファイルの内容を読み込む
|
11 |
+
data = pickle.load(file)
|
12 |
+
|
13 |
+
# 読み込んだデータを表示
|
14 |
+
print(data)
|
15 |
+
|
16 |
+
# %%
|
17 |
+
|
18 |
+
data["full"]["elo_rating_final"]
|
19 |
+
|
20 |
+
# %%
|
21 |
+
|
22 |
+
df2 = data["full"]["leaderboard_table_df"]
|
23 |
+
df2 = df2.sort_values("rating", ascending=False)
|
24 |
+
ds2 = datasets.Dataset.from_pandas(df2)
|
25 |
+
ds2.push_to_hub("kanhatakeyama/chatbot-arena-ja-elo-rating")
|
26 |
+
|
27 |
+
|
28 |
+
# %%
|
local/leaderboard
ADDED
@@ -0,0 +1,21 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
#memo
|
2 |
+
#fastchatを入れて、以下のコードを実行
|
3 |
+
|
4 |
+
|
5 |
+
#conda activate arena
|
6 |
+
while true; do
|
7 |
+
#git
|
8 |
+
cd chatbotarena-ja-log
|
9 |
+
git pull
|
10 |
+
cd ../
|
11 |
+
cp chatbotarena-ja-log/data/*-conv.json server0 #copy
|
12 |
+
rm elo_results.pkl
|
13 |
+
rm clean.json
|
14 |
+
cp ../*-conv.json server0 #copy
|
15 |
+
python3 ../fastchat/serve/monitor/clean_battle_data.py
|
16 |
+
mv clean_battle*.json clean.json
|
17 |
+
python3 ../fastchat/serve/monitor/elo_analysis.py --clean-battle-file clean.json
|
18 |
+
mv elo_results*.pkl elo_results.pkl
|
19 |
+
python3 hf_upload.py
|
20 |
+
sleep 7200
|
21 |
+
done
|
local/local_setup
CHANGED
@@ -1,10 +1,13 @@
|
|
1 |
-
|
2 |
-
|
3 |
-
sudo apt
|
4 |
-
|
5 |
-
|
|
|
|
|
|
|
6 |
#lauch local server
|
7 |
-
|
8 |
export CUDA_VISIBLE_DEVICES=0
|
9 |
python -m vllm.entrypoints.openai.api_server --model cyberagent/calm3-22b-chat \
|
10 |
--max-model-len 4096 --port 8011 \
|
@@ -16,9 +19,8 @@ python -m vllm.entrypoints.openai.api_server --model cyberagent/calm3-22b-chat \
|
|
16 |
export CUDA_VISIBLE_DEVICES=0
|
17 |
python -m vllm.entrypoints.openai.api_server --model weblab-GENIAC/Tanuki-8B-dpo-v1.0 --max-model-len 4096 --port 8012 --gpu-memory-utilization 0.2 --trust-remote-code --quantization bitsandbytes --load-format bitsandbytes --api-key $VLLM_API_KEY
|
18 |
|
19 |
-
|
20 |
-
export CUDA_VISIBLE_DEVICES=0
|
21 |
#llama.cpp swallow 8b
|
|
|
22 |
../llama-server -m tokyotech-llm-Llama-3.1-Swallow-8B-Instruct-v0.1-Q8_0.gguf --n_gpu_layers 100 --port 8010
|
23 |
|
24 |
#llmjp13b
|
@@ -29,6 +31,6 @@ export CUDA_VISIBLE_DEVICES=0
|
|
29 |
export CUDA_VISIBLE_DEVICES=1
|
30 |
python -m vllm.entrypoints.openai.api_server --model tokyotech-llm/Llama-3.1-Swallow-70B-Instruct-v0.1 --max-model-len 4096 --port 8019 --gpu-memory-utilization 0.6 --trust-remote-code --quantization bitsandbytes --load-format bitsandbytes --api-key $VLLM_API_KEY
|
31 |
|
32 |
-
|
33 |
#launch ngrok
|
34 |
ngrok http http://localhost:8765
|
|
|
1 |
+
########################
|
2 |
+
#install nginx
|
3 |
+
#sudo apt update
|
4 |
+
#sudo apt install nginx
|
5 |
+
#sudo vi /etc/nginx/sites-available/default #edit
|
6 |
+
#sudo systemctl start nginx
|
7 |
+
|
8 |
+
###########################
|
9 |
#lauch local server
|
10 |
+
cd /data/2024/1018chatbotarena/llama.cpp/download
|
11 |
export CUDA_VISIBLE_DEVICES=0
|
12 |
python -m vllm.entrypoints.openai.api_server --model cyberagent/calm3-22b-chat \
|
13 |
--max-model-len 4096 --port 8011 \
|
|
|
19 |
export CUDA_VISIBLE_DEVICES=0
|
20 |
python -m vllm.entrypoints.openai.api_server --model weblab-GENIAC/Tanuki-8B-dpo-v1.0 --max-model-len 4096 --port 8012 --gpu-memory-utilization 0.2 --trust-remote-code --quantization bitsandbytes --load-format bitsandbytes --api-key $VLLM_API_KEY
|
21 |
|
|
|
|
|
22 |
#llama.cpp swallow 8b
|
23 |
+
export CUDA_VISIBLE_DEVICES=0
|
24 |
../llama-server -m tokyotech-llm-Llama-3.1-Swallow-8B-Instruct-v0.1-Q8_0.gguf --n_gpu_layers 100 --port 8010
|
25 |
|
26 |
#llmjp13b
|
|
|
31 |
export CUDA_VISIBLE_DEVICES=1
|
32 |
python -m vllm.entrypoints.openai.api_server --model tokyotech-llm/Llama-3.1-Swallow-70B-Instruct-v0.1 --max-model-len 4096 --port 8019 --gpu-memory-utilization 0.6 --trust-remote-code --quantization bitsandbytes --load-format bitsandbytes --api-key $VLLM_API_KEY
|
33 |
|
34 |
+
#########################
|
35 |
#launch ngrok
|
36 |
ngrok http http://localhost:8765
|
serve/gradio_block_arena_named.py
CHANGED
@@ -316,7 +316,7 @@ def flash_buttons():
|
|
316 |
|
317 |
def build_side_by_side_ui_named(models):
|
318 |
notice_markdown = f"""
|
319 |
-
# ⚔️ Chatbot Arena
|
320 |
|
321 |
{SURVEY_LINK}
|
322 |
|
|
|
316 |
|
317 |
def build_side_by_side_ui_named(models):
|
318 |
notice_markdown = f"""
|
319 |
+
# ⚔️ Chatbot Arena
|
320 |
|
321 |
{SURVEY_LINK}
|
322 |
|
serve/gradio_web_server.py
CHANGED
@@ -70,7 +70,7 @@ acknowledgment_md = """
|
|
70 |
|
71 |
- 違法、有害、暴力、人種差別、または性的目的で使用しないでください。
|
72 |
- 個人情報をアップロードしないでください。
|
73 |
-
-
|
74 |
|
75 |
"""
|
76 |
|
@@ -821,14 +821,14 @@ def build_single_model_ui(models, add_promotion_links=False):
|
|
821 |
show_label=False,
|
822 |
container=False,
|
823 |
)
|
824 |
-
with gr.Row():
|
825 |
-
|
826 |
-
|
827 |
-
|
828 |
-
|
829 |
-
|
830 |
-
|
831 |
-
|
832 |
|
833 |
chatbot = gr.Chatbot(
|
834 |
elem_id="chatbot",
|
|
|
70 |
|
71 |
- 違法、有害、暴力、人種差別、または性的目的で使用しないでください。
|
72 |
- 個人情報をアップロードしないでください。
|
73 |
+
- このサービスで収集された対話データは今後の大規模言語モデルの開発での使用のほか、適切なマスキング処理を施した上で、クリエイティブ コモンズ アトリビューション (CC-BY) または同様のライセンスの下で配布される可能性があります。
|
74 |
|
75 |
"""
|
76 |
|
|
|
821 |
show_label=False,
|
822 |
container=False,
|
823 |
)
|
824 |
+
# with gr.Row():
|
825 |
+
# with gr.Accordion(
|
826 |
+
# f"🔍 Expand to see the descriptions of {len(models)} models",
|
827 |
+
# open=False,
|
828 |
+
# ):
|
829 |
+
# model_description_md = get_model_description_md(models)
|
830 |
+
# gr.Markdown(model_description_md,
|
831 |
+
# elem_id="model_description_markdown")
|
832 |
|
833 |
chatbot = gr.Chatbot(
|
834 |
elem_id="chatbot",
|