Instructions to use zai-org/codegeex4-all-9b with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use zai-org/codegeex4-all-9b with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="zai-org/codegeex4-all-9b", trust_remote_code=True)# Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("zai-org/codegeex4-all-9b", trust_remote_code=True, dtype="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps
- vLLM
How to use zai-org/codegeex4-all-9b with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "zai-org/codegeex4-all-9b" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "zai-org/codegeex4-all-9b", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/zai-org/codegeex4-all-9b
- SGLang
How to use zai-org/codegeex4-all-9b 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 "zai-org/codegeex4-all-9b" \ --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": "zai-org/codegeex4-all-9b", "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 "zai-org/codegeex4-all-9b" \ --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": "zai-org/codegeex4-all-9b", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use zai-org/codegeex4-all-9b with Docker Model Runner:
docker model run hf.co/zai-org/codegeex4-all-9b
Update README.md
#21 opened about 1 year ago
by
G-Nexus
TypeError: ChatGLM4Tokenizer._pad() got an unexpected keyword argument 'padding_side'
1
#20 opened over 1 year ago
by
zzzyoyoru
How it use with Koboldcpp?
#19 opened over 1 year ago
by
levaone
codegeex4模型是否支持微调?
1
#18 opened almost 2 years ago
by
Pingbo
后缀传递无效
#17 opened almost 2 years ago
by
xtuxiongda
代码补全如何关联现有项目
#16 opened almost 2 years ago
by
xtuxiongda
使用示例代码,给出无效输出
1
#15 opened almost 2 years ago
by
aa327chenge
[AUTOMATED] Model Memory Requirements
#14 opened almost 2 years ago
by
model-sizer-bot
代码补全效果咨询
5
#13 opened almost 2 years ago
by
xtuxiongda
My alternative quantizations
👍 2
#11 opened almost 2 years ago
by
ZeroWw
能否像CodeQwen1.5-7B-Chat一样,提供tokenizer.json文件?
1
#10 opened almost 2 years ago
by
NTUYG
线上这个部署的demo,请问基本参数是怎么设置的(最佳的部署设置是?)
3
#6 opened almost 2 years ago
by
chuangzhidian
That 9b modlel for coding is INSANE good. How is that even possible?
🔥 4
#4 opened almost 2 years ago
by
mirek190
Great model, very impressive
🚀 1
1
#3 opened almost 2 years ago
by
gmacgmac
请问指令微调的数据格式和glm4-9b-chat一致么?
2
#2 opened almost 2 years ago
by
yuezhiyu