Instructions to use taide/TAIDE-LX-7B with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use taide/TAIDE-LX-7B with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="taide/TAIDE-LX-7B")# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("taide/TAIDE-LX-7B") model = AutoModelForCausalLM.from_pretrained("taide/TAIDE-LX-7B") - Notebooks
- Google Colab
- Kaggle
- Local Apps
- vLLM
How to use taide/TAIDE-LX-7B with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "taide/TAIDE-LX-7B" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "taide/TAIDE-LX-7B", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/taide/TAIDE-LX-7B
- SGLang
How to use taide/TAIDE-LX-7B with SGLang:
Install from pip and serve model
# Install SGLang from pip: pip install sglang # Start the SGLang server: python3 -m sglang.launch_server \ --model-path "taide/TAIDE-LX-7B" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "taide/TAIDE-LX-7B", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker images
docker run --gpus all \ --shm-size 32g \ -p 30000:30000 \ -v ~/.cache/huggingface:/root/.cache/huggingface \ --env "HF_TOKEN=<secret>" \ --ipc=host \ lmsysorg/sglang:latest \ python3 -m sglang.launch_server \ --model-path "taide/TAIDE-LX-7B" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "taide/TAIDE-LX-7B", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use taide/TAIDE-LX-7B with Docker Model Runner:
docker model run hf.co/taide/TAIDE-LX-7B
突然不能使用taide/TAIDE-LX-7B的分詞器跟模型
今天想要使用 taide/TAIDE-LX-7B作為醫療問答資料微調的基底模型
昨天都還可以正常使用
但今天不知道為啥就突然不行了,想確認下原因,不好意思
您好,
請問如果用 browser 瀏覽網頁,是否看的到以下的檔案?
https://huggingface.co/taide/TAIDE-LX-7B/blob/main/config.json
No: huggingface 官方出了問題,等他們修復。
Yes: 您的環境 or 網路出了問題。
簡單測試:https://huggingface.co/docs/huggingface_hub/guides/cli
在 command line 環境執行 ($HF_TOKEN 參考這裡: https://huggingface.co/settings/tokens):
huggingface-cli login --token $HF_TOKEN --add-to-git-credential下載檔案:
huggingface-cli download taide/TAIDE-LX-7B --include "config.json"
看看是否正常。
Best Regards.
您好, 謝謝如此快速地回覆
我是看得到的,不過我是在colab上面導入的,所以我猜colab應該也是可以的
,另外我剛剛試gpt2的模型是可以的,所以就有點疑問
不好意思
您好,
我測試 colab 是可以使用 taide/TAIDE-LX-7B:
例如,以下的 API,可以使用 taide/TAIDE-LX-7B 的 config.json(測試能不能使用,只下載一個檔案):
把 token 改成您自己的 token (https://huggingface.co/settings/tokens)
from huggingface_hub import hf_hub_download
hf_hub_download(repo_id="taide/TAIDE-LX-7B", filename="config.json", token="Use you own token")
您需要檢查一下程式碼、API 和 logs 的問題,看看是否 access token 錯誤or過期,還有根據 logs 分析哪裡【不行】。
Best Regards。
您好 謝謝回覆
目前是能順利載入了
萬分謝謝協助