Instructions to use hfl/chinese-alpaca-2-7b-gguf with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- llama-cpp-python
How to use hfl/chinese-alpaca-2-7b-gguf with llama-cpp-python:
# !pip install llama-cpp-python from llama_cpp import Llama llm = Llama.from_pretrained( repo_id="hfl/chinese-alpaca-2-7b-gguf", filename="ggml-model-f16.gguf", )
output = llm( "Once upon a time,", max_tokens=512, echo=True ) print(output)
- Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- llama.cpp
How to use hfl/chinese-alpaca-2-7b-gguf with llama.cpp:
Install (macOS, Linux)
curl -LsSf https://llama.app/install.sh | sh # Start a local OpenAI-compatible server with a web UI: llama serve -hf hfl/chinese-alpaca-2-7b-gguf:F16 # Run inference directly in the terminal: llama cli -hf hfl/chinese-alpaca-2-7b-gguf:F16
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama serve -hf hfl/chinese-alpaca-2-7b-gguf:F16 # Run inference directly in the terminal: llama cli -hf hfl/chinese-alpaca-2-7b-gguf:F16
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 hfl/chinese-alpaca-2-7b-gguf:F16 # Run inference directly in the terminal: ./llama-cli -hf hfl/chinese-alpaca-2-7b-gguf:F16
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 hfl/chinese-alpaca-2-7b-gguf:F16 # Run inference directly in the terminal: ./build/bin/llama-cli -hf hfl/chinese-alpaca-2-7b-gguf:F16
Use Docker
docker model run hf.co/hfl/chinese-alpaca-2-7b-gguf:F16
- LM Studio
- Jan
- Ollama
How to use hfl/chinese-alpaca-2-7b-gguf with Ollama:
ollama run hf.co/hfl/chinese-alpaca-2-7b-gguf:F16
- Unsloth Studio
How to use hfl/chinese-alpaca-2-7b-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 hfl/chinese-alpaca-2-7b-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 hfl/chinese-alpaca-2-7b-gguf to start chatting
Using HuggingFace Spaces for Unsloth
# No setup required # Open https://huggingface.co/spaces/unsloth/studio in your browser # Search for hfl/chinese-alpaca-2-7b-gguf to start chatting
- Atomic Chat new
- Docker Model Runner
How to use hfl/chinese-alpaca-2-7b-gguf with Docker Model Runner:
docker model run hf.co/hfl/chinese-alpaca-2-7b-gguf:F16
- Lemonade
How to use hfl/chinese-alpaca-2-7b-gguf with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull hfl/chinese-alpaca-2-7b-gguf:F16
Run and chat with the model
lemonade run user.chinese-alpaca-2-7b-gguf-F16
List all available models
lemonade list
Run and chat with the model
lemonade run user.chinese-alpaca-2-7b-gguf-List all available models
lemonade listChinese-Alpaca-2-7B-GGUF
This repository contains the GGUF-v3 models (llama.cpp compatible) for Chinese-Alpaca-2-7B.
Performance
Metric: PPL, lower is better
| Quant | original | imatrix (-im) |
|---|---|---|
| Q2_K | 10.3705 +/- 0.14109 | 11.7442 +/- 0.16034 |
| Q3_K | 8.8478 +/- 0.12085 | 8.7104 +/- 0.11925 |
| Q4_0 | 8.6418 +/- 0.11876 | - |
| Q4_K | 8.3294 +/- 0.11396 | 8.3034 +/- 0.11391 |
| Q5_0 | 8.3320 +/- 0.11411 | - |
| Q5_K | 8.2361 +/- 0.11298 | 8.2136 +/- 0.11281 |
| Q6_K | 8.1956 +/- 0.11259 | 8.1852 +/- 0.11246 |
| Q8_0 | 8.1784 +/- 0.11232 | - |
| F16 | 8.1799 +/- 0.11243 | - |
The model with -im suffix is generated with important matrix, which has generally better performance (not always though).
Others
For Hugging Face version, please see: https://huggingface.co/hfl/chinese-alpaca-2-7b
Please refer to https://github.com/ymcui/Chinese-LLaMA-Alpaca-2/ for more details.
- Downloads last month
- 240
2-bit
4-bit
5-bit
6-bit
8-bit
16-bit
Pull the model
# Download Lemonade from https://lemonade-server.ai/lemonade pull hfl/chinese-alpaca-2-7b-gguf: