Instructions to use wenge-research/yayi2-30b with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use wenge-research/yayi2-30b with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="wenge-research/yayi2-30b", trust_remote_code=True)# pip install -U transformers accelerate # Load model directly from transformers import AutoModelForCausalLM model = AutoModelForCausalLM.from_pretrained("wenge-research/yayi2-30b", trust_remote_code=True, device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use wenge-research/yayi2-30b with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "wenge-research/yayi2-30b" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "wenge-research/yayi2-30b", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/wenge-research/yayi2-30b
- SGLang
How to use wenge-research/yayi2-30b 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 "wenge-research/yayi2-30b" \ --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": "wenge-research/yayi2-30b", "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 "wenge-research/yayi2-30b" \ --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": "wenge-research/yayi2-30b", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use wenge-research/yayi2-30b with Docker Model Runner:
docker model run hf.co/wenge-research/yayi2-30b
Download pytorch_model-00002-of-00007.bin from wenge-research/yayi2-30b: direct link, hf CLI and curl.
- Browser
- Download file 9.81 GB
-
https://huggingface.co/wenge-research/yayi2-30b/resolve/45c074c58e3ea81bc35c15d4ad9eae80ddea1b38/pytorch_model-00002-of-00007.bin
- Command line
-
hf download hf://wenge-research/yayi2-30b@45c074c58e3ea81bc35c15d4ad9eae80ddea1b38/pytorch_model-00002-of-00007.bin
-
curl -L -o pytorch_model-00002-of-00007.bin https://huggingface.co/wenge-research/yayi2-30b/resolve/45c074c58e3ea81bc35c15d4ad9eae80ddea1b38/pytorch_model-00002-of-00007.bin
9.81 GB
- Xet hash:
- 773b41c8ebd89cee637eb5a6b4a7867258667ea355251e799b2c49bf75b6bed6
- Size of remote file:
- 9.81 GB
- SHA256:
- a553da624687b0bfed50704b233cfe1882b8e180e5e86eb2832c996ad7a1817a
·
Xet efficiently stores Large Files inside Git, intelligently splitting files into unique chunks and accelerating uploads and downloads. More info.