File size: 1,446 Bytes
23be6d3 2f80b15 c6b5a6a 2f80b15 c6b5a6a 23be6d3 2f80b15 23be6d3 1cb386c 23be6d3 431e7f9 23be6d3 6a5d1ac 23be6d3 2f80b15 1cf32f2 2f80b15 6a5d1ac 2f80b15 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 |
#!/usr/bin/env bash
set -e
# ุฅูุดุงุก ู
ุฌูุฏุงุช ูุชุฎุฒูู ุงููู
ุงุฐุฌ ูุงูู cache
mkdir -p models /app/.cache/huggingface/hub
chown -R appuser:appuser models /app/.cache/huggingface
chmod -R 755 /app/.cache/huggingface
# ุชุญู
ูู ู
ูู Mistral .gguf ุฅุฐุง ูู
ููู ู
ูุฌูุฏูุง ู
ุณุจููุง
python - <<PY
from huggingface_hub import hf_hub_download
import os
repo_id = "TheBloke/Mistral-7B-Instruct-v0.1-GGUF"
filename = "mistral-7b-instruct-v0.1.Q2_K.gguf"
local_dir = "models"
if not os.path.exists(os.path.join(local_dir, filename)):
hf_hub_download(
repo_id=repo_id,
filename=filename,
local_dir=local_dir,
local_dir_use_symlinks=False,
force_download=False
)
print("โ
ุชู
ุชุญู
ูู Mistral .gguf")
else:
print("โ
ู
ูู Mistral .gguf ู
ูุฌูุฏ ู
ุณุจููุง")
PY
# ุชุญู
ูู ูู
ูุฐุฌ MGZON-FLAN-T5 ุฅุฐุง ูู
ููู ู
ูุฌูุฏูุง ู
ุณุจููุง
python - <<PY
from huggingface_hub import snapshot_download
import os
repo_id = "MGZON/mgzon-flan-t5-base"
local_dir = "/app/.cache/huggingface/hub/models--MGZON--mgzon-flan-t5-base/snapshots"
if not os.path.exists(local_dir):
snapshot_download(
repo_id=repo_id,
local_dir=local_dir,
local_dir_use_symlinks=False,
force_download=False
)
print("โ
ุชู
ุชุญู
ูู MGZON-FLAN-T5")
else:
print("โ
ู
ููุงุช MGZON-FLAN-T5 ู
ูุฌูุฏุฉ ู
ุณุจููุง")
PY |