Instructions to use BricksDisplay/Yi-6B-q4 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use BricksDisplay/Yi-6B-q4 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="BricksDisplay/Yi-6B-q4")# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("BricksDisplay/Yi-6B-q4") model = AutoModelForCausalLM.from_pretrained("BricksDisplay/Yi-6B-q4") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use BricksDisplay/Yi-6B-q4 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "BricksDisplay/Yi-6B-q4" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "BricksDisplay/Yi-6B-q4", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/BricksDisplay/Yi-6B-q4
- SGLang
How to use BricksDisplay/Yi-6B-q4 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 "BricksDisplay/Yi-6B-q4" \ --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": "BricksDisplay/Yi-6B-q4", "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 "BricksDisplay/Yi-6B-q4" \ --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": "BricksDisplay/Yi-6B-q4", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use BricksDisplay/Yi-6B-q4 with Docker Model Runner:
docker model run hf.co/BricksDisplay/Yi-6B-q4
- Xet hash:
- ccfc46409ecee2bc2a0f021fd8b29a364f0247ac5e8ca0a50d5a1582303792cc
- Size of remote file:
- 6.08 GB
- SHA256:
- 893594fa60c62dc79b008bc291c3a61ed5004c64c3c2ed30f582fcf6aa279d22
·
Xet efficiently stores Large Files inside Git, intelligently splitting files into unique chunks and accelerating uploads and downloads. More info.