Instructions to use lastmass/llama3.2-chinese with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- llama-cpp-python
How to use lastmass/llama3.2-chinese with llama-cpp-python:
# !pip install llama-cpp-python from llama_cpp import Llama llm = Llama.from_pretrained( repo_id="lastmass/llama3.2-chinese", filename="unsloth.BF16.gguf", )
llm.create_chat_completion( messages = "No input example has been defined for this model task." )
- Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- llama.cpp
How to use lastmass/llama3.2-chinese with llama.cpp:
Install from brew
brew install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama-server -hf lastmass/llama3.2-chinese:Q4_K_M # Run inference directly in the terminal: llama-cli -hf lastmass/llama3.2-chinese:Q4_K_M
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama-server -hf lastmass/llama3.2-chinese:Q4_K_M # Run inference directly in the terminal: llama-cli -hf lastmass/llama3.2-chinese:Q4_K_M
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 lastmass/llama3.2-chinese:Q4_K_M # Run inference directly in the terminal: ./llama-cli -hf lastmass/llama3.2-chinese:Q4_K_M
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 lastmass/llama3.2-chinese:Q4_K_M # Run inference directly in the terminal: ./build/bin/llama-cli -hf lastmass/llama3.2-chinese:Q4_K_M
Use Docker
docker model run hf.co/lastmass/llama3.2-chinese:Q4_K_M
- LM Studio
- Jan
- Ollama
How to use lastmass/llama3.2-chinese with Ollama:
ollama run hf.co/lastmass/llama3.2-chinese:Q4_K_M
- Unsloth Studio
How to use lastmass/llama3.2-chinese 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 lastmass/llama3.2-chinese 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 lastmass/llama3.2-chinese to start chatting
Using HuggingFace Spaces for Unsloth
# No setup required # Open https://huggingface.co/spaces/unsloth/studio in your browser # Search for lastmass/llama3.2-chinese to start chatting
- Docker Model Runner
How to use lastmass/llama3.2-chinese with Docker Model Runner:
docker model run hf.co/lastmass/llama3.2-chinese:Q4_K_M
- Lemonade
How to use lastmass/llama3.2-chinese with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull lastmass/llama3.2-chinese:Q4_K_M
Run and chat with the model
lemonade run user.llama3.2-chinese-Q4_K_M
List all available models
lemonade list
| FROM /home/featurize/work/lastmass/llama3.2-chinese/unsloth.Q4_K_M.gguf | |
| TEMPLATE """以下是描述一项任务的指令。请输出合适的内容回应指令。 | |
| ### Input: | |
| 大象和猎豹的奔跑速度谁更快,简单说明原因. | |
| ### Response: | |
| 猎豹的奔跑速度比大象快得多。 | |
| 猎豹:是世界上奔跑速度最快的陆地动物之一,短距离内可以达到约 100-120 公里/小时(约 60-75 英里/小时)。 | |
| 大象:虽然大象体型巨大,但它们的速度较慢,奔跑速度最高约为 40 公里/小时(约 25 英里/小时)。 | |
| 因此,猎豹在速度上远远超过了大象。 | |
| ### Input: | |
| 鱼为什么能在水里呼吸。 | |
| ### Response: | |
| 鱼能够在水中呼吸,主要是因为它们有一种特殊的呼吸器官——鳃。鳃能够从水中提取氧气,并排出二氧化碳,这个过程使鱼能够在水中生存。 | |
| {{ if .Prompt }} | |
| ### 指令: | |
| {{ .Prompt }} | |
| {{ end }}### 回应: | |
| {{ .Response }}<|end_of_text|>""" | |
| PARAMETER stop "<|eot_id|>" | |
| PARAMETER stop "<|end_header_id|>" | |
| PARAMETER stop "<|finetune_right_pad_id|>" | |
| PARAMETER stop "<|eom_id|>" | |
| PARAMETER stop "<|python_tag|>" | |
| PARAMETER stop "<|start_header_id|>" | |
| PARAMETER stop "<|end_of_text|>" | |
| PARAMETER stop "<|reserved_special_token_" | |
| PARAMETER temperature 1.5 | |
| PARAMETER min_p 0.1 |