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 Settings
- 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
如何fine-tune模型以適應特定任務
您好,首先非常感謝TAIDE團隊開源此模型,
我想要詢問如果要fine-tune此模型,
是否可以用meta llama提供的微調方式,
來微調TAIDE-LX-7B模型呢?
再次感謝,靜候回復!
您好,
請參考:
https://huggingface.co/learn/nlp-course/zh-TW/chapter3/1?fw=pt
- 準備訓練資料
- 微調(預訓練)模型
Best regards.
taide模型有自己的tokenizer嗎?還是可以沿用llama3 的 tokenizer?
您好,
taide/TAIDE-LX-7B 是基於 llama-2 模型訓練。
llama-3 版本請參考:https://huggingface.co/taide/Llama3-TAIDE-LX-8B-Chat-Alpha1
Best Regards.
感謝您的回覆,謝謝。
您好,
我查 看taide llama 3的模型,發現和llama 2的taide使用不同的tokenizer詞表,taide llama 2看來是使用自行訓練的擴充詞表。但taide llama 3使用的是和llama3一樣的詞表128K的,所以taide llama 3版本並沒有自己訓練tokenizer並擴充詞表,這樣如何做continuous pretraining? 還是taide llama3只有做sft及rlhf?謝謝
您好,
關於 CP 模型的釋出,敬請等候,謝謝您。
Regards.
