Instructions to use shaowenchen/baichuan2-7b-chat-gguf with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- llama-cpp-python
How to use shaowenchen/baichuan2-7b-chat-gguf with llama-cpp-python:
# !pip install llama-cpp-python from llama_cpp import Llama llm = Llama.from_pretrained( repo_id="shaowenchen/baichuan2-7b-chat-gguf", filename="baichuan2-7b-chat.Q2_K.gguf", )
output = llm( "Once upon a time,", max_tokens=512, echo=True ) print(output)
- Notebooks
- Google Colab
- Kaggle
- Local Apps
- llama.cpp
How to use shaowenchen/baichuan2-7b-chat-gguf with llama.cpp:
Install from brew
brew install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama-server -hf shaowenchen/baichuan2-7b-chat-gguf:Q4_K_S # Run inference directly in the terminal: llama-cli -hf shaowenchen/baichuan2-7b-chat-gguf:Q4_K_S
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama-server -hf shaowenchen/baichuan2-7b-chat-gguf:Q4_K_S # Run inference directly in the terminal: llama-cli -hf shaowenchen/baichuan2-7b-chat-gguf:Q4_K_S
Use pre-built binary
# Download pre-built binary from: # https://github.com/ggerganov/llama.cpp/releases # Start a local OpenAI-compatible server with a web UI: ./llama-server -hf shaowenchen/baichuan2-7b-chat-gguf:Q4_K_S # Run inference directly in the terminal: ./llama-cli -hf shaowenchen/baichuan2-7b-chat-gguf:Q4_K_S
Build from source code
git clone https://github.com/ggerganov/llama.cpp.git cd llama.cpp cmake -B build cmake --build build -j --target llama-server llama-cli # Start a local OpenAI-compatible server with a web UI: ./build/bin/llama-server -hf shaowenchen/baichuan2-7b-chat-gguf:Q4_K_S # Run inference directly in the terminal: ./build/bin/llama-cli -hf shaowenchen/baichuan2-7b-chat-gguf:Q4_K_S
Use Docker
docker model run hf.co/shaowenchen/baichuan2-7b-chat-gguf:Q4_K_S
- LM Studio
- Jan
- vLLM
How to use shaowenchen/baichuan2-7b-chat-gguf with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "shaowenchen/baichuan2-7b-chat-gguf" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "shaowenchen/baichuan2-7b-chat-gguf", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/shaowenchen/baichuan2-7b-chat-gguf:Q4_K_S
- Ollama
How to use shaowenchen/baichuan2-7b-chat-gguf with Ollama:
ollama run hf.co/shaowenchen/baichuan2-7b-chat-gguf:Q4_K_S
- Unsloth Studio new
How to use shaowenchen/baichuan2-7b-chat-gguf with Unsloth Studio:
Install Unsloth Studio (macOS, Linux, WSL)
curl -fsSL https://unsloth.ai/install.sh | sh # Run unsloth studio unsloth studio -H 0.0.0.0 -p 8888 # Then open http://localhost:8888 in your browser # Search for shaowenchen/baichuan2-7b-chat-gguf to start chatting
Install Unsloth Studio (Windows)
irm https://unsloth.ai/install.ps1 | iex # Run unsloth studio unsloth studio -H 0.0.0.0 -p 8888 # Then open http://localhost:8888 in your browser # Search for shaowenchen/baichuan2-7b-chat-gguf to start chatting
Using HuggingFace Spaces for Unsloth
# No setup required # Open https://huggingface.co/spaces/unsloth/studio in your browser # Search for shaowenchen/baichuan2-7b-chat-gguf to start chatting
- Docker Model Runner
How to use shaowenchen/baichuan2-7b-chat-gguf with Docker Model Runner:
docker model run hf.co/shaowenchen/baichuan2-7b-chat-gguf:Q4_K_S
- Lemonade
How to use shaowenchen/baichuan2-7b-chat-gguf with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull shaowenchen/baichuan2-7b-chat-gguf:Q4_K_S
Run and chat with the model
lemonade run user.baichuan2-7b-chat-gguf-Q4_K_S
List all available models
lemonade list
Provided files
| Name | Quant method | Size |
|---|---|---|
| baichuan2-7b-chat.Q2_K.gguf | Q2_K | 3.0 GB |
| baichuan2-7b-chat.Q3_K.gguf | Q3_K | 3.5 GB |
| baichuan2-7b-chat.Q3_K_L.gguf | Q3_K_L | 3.8 GB |
| baichuan2-7b-chat.Q3_K_S.gguf | Q3_K_S | 3.2 GB |
| baichuan2-7b-chat.Q4_0.gguf | Q4_0 | 4.1 GB |
| baichuan2-7b-chat.Q4_1.gguf | Q4_1 | 4.5 GB |
| baichuan2-7b-chat.Q4_K.gguf | Q4_K | 4.3 GB |
| baichuan2-7b-chat.Q4_K_S.gguf | Q4_K_S | 4.1 GB |
| baichuan2-7b-chat.Q5_0.gguf | Q5_0 | 4.9 GB |
| baichuan2-7b-chat.Q5_1.gguf | Q5_1 | 5.3 GB |
| baichuan2-7b-chat.Q5_K.gguf | Q5_K | 5.0 GB |
| baichuan2-7b-chat.Q5_K_S.gguf | Q5_K_S | 4.9 GB |
| baichuan2-7b-chat.Q6_K.gguf | Q6_K | 5.7 GB |
| baichuan2-7b-chat.Q8_0.gguf | Q8_0 | 7.4 GB |
| baichuan2-7b-chat.gguf | full | 14 GB |
Usage:
docker run --rm -it -p 8000:8000 -v /path/to/models:/models -e MODEL=/models/gguf-model-name.gguf hubimage/llama-cpp-python:latest
and you can view http://localhost:8000/docs to see the swagger UI.
Provided images
| Name | Quant method | Size |
|---|---|---|
shaowenchen/baichuan2-7b-chat-gguf:Q2_K |
Q2_K | 7.59 GB |
shaowenchen/baichuan2-7b-chat-gguf:Q3_K |
Q3_K | 8.61 GB |
shaowenchen/baichuan2-7b-chat-gguf:Q3_K_L |
Q3_K_L | 9.23 GB |
shaowenchen/baichuan2-7b-chat-gguf:Q3_K_S |
Q3_K_S | 7.93 GB |
shaowenchen/baichuan2-7b-chat-gguf:Q4_0 |
Q4_0 | 9.6 GB |
Usage:
docker run --rm -p 8000:8000 shaowenchen/baichuan2-7b-chat-gguf:Q2_K
and you can view http://localhost:8000/docs to see the swagger UI.
- Downloads last month
- 170
Hardware compatibility
Log In to add your hardware