Spaces:
Paused
Paused
Commit
•
dd6edef
1
Parent(s):
28cd485
Added a build script for dolphin-2_6-phi-2
Browse files
docker/scripts/build-dolphin-2_6-phi-2.sh
ADDED
@@ -0,0 +1,26 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
#!/bin/bash -e
|
2 |
+
|
3 |
+
## Note: Phi is only available in main branch and hasnt been released yet. So, make sure to build TensorRT-LLM from main branch.
|
4 |
+
|
5 |
+
cd /root/TensorRT-LLM-examples/phi
|
6 |
+
|
7 |
+
## Build TensorRT for [Dolphin Phi Finetuned](https://huggingface.co/cognitivecomputations/dolphin-2_6-phi-2) ChatML format with `fp16`
|
8 |
+
|
9 |
+
git lfs install
|
10 |
+
phi_path=$(huggingface-cli download --repo-type model cognitivecomputations/dolphin-2_6-phi-2)
|
11 |
+
name=dolphin-2_6-phi-2
|
12 |
+
python3 build.py --dtype=float16 \
|
13 |
+
--log_level=verbose \
|
14 |
+
--use_gpt_attention_plugin float16 \
|
15 |
+
--use_gemm_plugin float16 \
|
16 |
+
--max_batch_size=1 \
|
17 |
+
--max_input_len=1024 \
|
18 |
+
--max_output_len=1024 \
|
19 |
+
--output_dir=$name \
|
20 |
+
--model_dir="$phi_path" >&1 | tee build.log
|
21 |
+
|
22 |
+
dest=/root/scratch-space/models
|
23 |
+
mkdir -p "$dest/$name/tokenizer"
|
24 |
+
cp -r "$name" "$dest"
|
25 |
+
(cd "$phi_path" && cp config.json tokenizer_config.json vocab.json merges.txt "$dest/$name/tokenizer")
|
26 |
+
cp -r "$phi_path" "$dest/phi-orig-model"
|
docker/scripts/build-models.sh
CHANGED
@@ -4,4 +4,4 @@ test -f /etc/shinit_v2 && source /etc/shinit_v2
|
|
4 |
|
5 |
./build-whisper.sh
|
6 |
# ./build-mistral.sh
|
7 |
-
./build-phi-2.sh
|
|
|
4 |
|
5 |
./build-whisper.sh
|
6 |
# ./build-mistral.sh
|
7 |
+
./build-dolphin-2_6-phi-2.sh
|
docker/scripts/run-whisperfusion.sh
CHANGED
@@ -6,8 +6,8 @@ cd WhisperFusion
|
|
6 |
if [ "$1" != "mistral" ]; then
|
7 |
exec python3 main.py --phi \
|
8 |
--whisper_tensorrt_path /root/whisper_small_en \
|
9 |
-
--phi_tensorrt_path /root/phi-2 \
|
10 |
-
--phi_tokenizer_path /root/phi-2
|
11 |
else
|
12 |
exec python3 main.py --mistral \
|
13 |
--whisper_tensorrt_path /root/models/whisper_small_en \
|
|
|
6 |
if [ "$1" != "mistral" ]; then
|
7 |
exec python3 main.py --phi \
|
8 |
--whisper_tensorrt_path /root/whisper_small_en \
|
9 |
+
--phi_tensorrt_path /root/dolphin-2_6-phi-2 \
|
10 |
+
--phi_tokenizer_path /root/dolphin-2_6-phi-2/tokenizer
|
11 |
else
|
12 |
exec python3 main.py --mistral \
|
13 |
--whisper_tensorrt_path /root/models/whisper_small_en \
|