Text Generation
Transformers
Safetensors
GGUF
English
Chinese
llama
llama-factory
orpo
conversational
text-generation-inference
Instructions to use shenzhi-wang/Llama3.1-70B-Chinese-Chat with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use shenzhi-wang/Llama3.1-70B-Chinese-Chat with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="shenzhi-wang/Llama3.1-70B-Chinese-Chat") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("shenzhi-wang/Llama3.1-70B-Chinese-Chat") model = AutoModelForCausalLM.from_pretrained("shenzhi-wang/Llama3.1-70B-Chinese-Chat", device_map="auto") messages = [ {"role": "user", "content": "Who are you?"}, ] inputs = tokenizer.apply_chat_template( messages, add_generation_prompt=True, tokenize=True, return_dict=True, return_tensors="pt", ).to(model.device) outputs = model.generate(**inputs, max_new_tokens=40) print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Inference
- Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- llama.cpp
How to use shenzhi-wang/Llama3.1-70B-Chinese-Chat 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 shenzhi-wang/Llama3.1-70B-Chinese-Chat:Q4_K_M # Run inference directly in the terminal: llama cli -hf shenzhi-wang/Llama3.1-70B-Chinese-Chat:Q4_K_M
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama serve -hf shenzhi-wang/Llama3.1-70B-Chinese-Chat:Q4_K_M # Run inference directly in the terminal: llama cli -hf shenzhi-wang/Llama3.1-70B-Chinese-Chat: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 shenzhi-wang/Llama3.1-70B-Chinese-Chat:Q4_K_M # Run inference directly in the terminal: ./llama-cli -hf shenzhi-wang/Llama3.1-70B-Chinese-Chat: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 shenzhi-wang/Llama3.1-70B-Chinese-Chat:Q4_K_M # Run inference directly in the terminal: ./build/bin/llama-cli -hf shenzhi-wang/Llama3.1-70B-Chinese-Chat:Q4_K_M
Use Docker
docker model run hf.co/shenzhi-wang/Llama3.1-70B-Chinese-Chat:Q4_K_M
- LM Studio
- Jan
- vLLM
How to use shenzhi-wang/Llama3.1-70B-Chinese-Chat with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "shenzhi-wang/Llama3.1-70B-Chinese-Chat" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "shenzhi-wang/Llama3.1-70B-Chinese-Chat", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/shenzhi-wang/Llama3.1-70B-Chinese-Chat:Q4_K_M
- SGLang
How to use shenzhi-wang/Llama3.1-70B-Chinese-Chat 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 "shenzhi-wang/Llama3.1-70B-Chinese-Chat" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "shenzhi-wang/Llama3.1-70B-Chinese-Chat", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'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 "shenzhi-wang/Llama3.1-70B-Chinese-Chat" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "shenzhi-wang/Llama3.1-70B-Chinese-Chat", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Ollama
How to use shenzhi-wang/Llama3.1-70B-Chinese-Chat with Ollama:
ollama run hf.co/shenzhi-wang/Llama3.1-70B-Chinese-Chat:Q4_K_M
- Unsloth Desktop
- Docker Model Runner
How to use shenzhi-wang/Llama3.1-70B-Chinese-Chat with Docker Model Runner:
docker model run hf.co/shenzhi-wang/Llama3.1-70B-Chinese-Chat:Q4_K_M
- Lemonade
How to use shenzhi-wang/Llama3.1-70B-Chinese-Chat with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull shenzhi-wang/Llama3.1-70B-Chinese-Chat:Q4_K_M
Run and chat with the model
lemonade run user.Llama3.1-70B-Chinese-Chat-Q4_K_M
List all available models
lemonade list
- Atomic Chat
Upload folder using huggingface_hub
Browse files- .gitattributes +6 -0
- gguf/llama3.1_70b_chinese_chat_gguf_q8_0/llama3.1_70b_chinese_chat_gguf_q8_0-00001-of-00006.gguf +3 -0
- gguf/llama3.1_70b_chinese_chat_gguf_q8_0/llama3.1_70b_chinese_chat_gguf_q8_0-00002-of-00006.gguf +3 -0
- gguf/llama3.1_70b_chinese_chat_gguf_q8_0/llama3.1_70b_chinese_chat_gguf_q8_0-00003-of-00006.gguf +3 -0
- gguf/llama3.1_70b_chinese_chat_gguf_q8_0/llama3.1_70b_chinese_chat_gguf_q8_0-00004-of-00006.gguf +3 -0
- gguf/llama3.1_70b_chinese_chat_gguf_q8_0/llama3.1_70b_chinese_chat_gguf_q8_0-00005-of-00006.gguf +3 -0
- gguf/llama3.1_70b_chinese_chat_gguf_q8_0/llama3.1_70b_chinese_chat_gguf_q8_0-00006-of-00006.gguf +3 -0
.gitattributes
CHANGED
|
@@ -39,3 +39,9 @@ gguf/llama3.1_70b_chinese_chat_gguf_f16/llama3-00003-of-00004.gguf filter=lfs di
|
|
| 39 |
gguf/llama3.1_70b_chinese_chat_gguf_f16/llama3-00004-of-00004.gguf filter=lfs diff=lfs merge=lfs -text
|
| 40 |
gguf/llama3.1_70b_chinese_chat_q3_k_m.gguf filter=lfs diff=lfs merge=lfs -text
|
| 41 |
gguf/llama3.1_70b_chinese_chat_q4_k_m.gguf filter=lfs diff=lfs merge=lfs -text
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 39 |
gguf/llama3.1_70b_chinese_chat_gguf_f16/llama3-00004-of-00004.gguf filter=lfs diff=lfs merge=lfs -text
|
| 40 |
gguf/llama3.1_70b_chinese_chat_q3_k_m.gguf filter=lfs diff=lfs merge=lfs -text
|
| 41 |
gguf/llama3.1_70b_chinese_chat_q4_k_m.gguf filter=lfs diff=lfs merge=lfs -text
|
| 42 |
+
gguf/llama3.1_70b_chinese_chat_gguf_q8_0/llama3.1_70b_chinese_chat_gguf_q8_0-00001-of-00006.gguf filter=lfs diff=lfs merge=lfs -text
|
| 43 |
+
gguf/llama3.1_70b_chinese_chat_gguf_q8_0/llama3.1_70b_chinese_chat_gguf_q8_0-00002-of-00006.gguf filter=lfs diff=lfs merge=lfs -text
|
| 44 |
+
gguf/llama3.1_70b_chinese_chat_gguf_q8_0/llama3.1_70b_chinese_chat_gguf_q8_0-00003-of-00006.gguf filter=lfs diff=lfs merge=lfs -text
|
| 45 |
+
gguf/llama3.1_70b_chinese_chat_gguf_q8_0/llama3.1_70b_chinese_chat_gguf_q8_0-00004-of-00006.gguf filter=lfs diff=lfs merge=lfs -text
|
| 46 |
+
gguf/llama3.1_70b_chinese_chat_gguf_q8_0/llama3.1_70b_chinese_chat_gguf_q8_0-00005-of-00006.gguf filter=lfs diff=lfs merge=lfs -text
|
| 47 |
+
gguf/llama3.1_70b_chinese_chat_gguf_q8_0/llama3.1_70b_chinese_chat_gguf_q8_0-00006-of-00006.gguf filter=lfs diff=lfs merge=lfs -text
|
gguf/llama3.1_70b_chinese_chat_gguf_q8_0/llama3.1_70b_chinese_chat_gguf_q8_0-00001-of-00006.gguf
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:8922124a75d75d6dc0f2d6b7ea73cebec88c39dd1be1b96a345264b4cd44ee15
|
| 3 |
+
size 13852732224
|
gguf/llama3.1_70b_chinese_chat_gguf_q8_0/llama3.1_70b_chinese_chat_gguf_q8_0-00002-of-00006.gguf
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:65ef20aa19a142e3179ff1e7db1147ef51528fd2edc5112794d78656b6a3517b
|
| 3 |
+
size 13227662944
|
gguf/llama3.1_70b_chinese_chat_gguf_q8_0/llama3.1_70b_chinese_chat_gguf_q8_0-00003-of-00006.gguf
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:ded01696fb52fb6ace108368eb8661297b81ad8182e02ca67ca163f7772ab9b7
|
| 3 |
+
size 12978134624
|
gguf/llama3.1_70b_chinese_chat_gguf_q8_0/llama3.1_70b_chinese_chat_gguf_q8_0-00004-of-00006.gguf
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:cf5ec95fee666479fadf8652d4ae2010e59f18afe29c2d5cb82cb8746ffebbfb
|
| 3 |
+
size 12808756832
|
gguf/llama3.1_70b_chinese_chat_gguf_q8_0/llama3.1_70b_chinese_chat_gguf_q8_0-00005-of-00006.gguf
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:87fa24bc143607f8cafea5f794b8f0ec4f03f04cf81d25069386a7fe64612cf2
|
| 3 |
+
size 12808756832
|
gguf/llama3.1_70b_chinese_chat_gguf_q8_0/llama3.1_70b_chinese_chat_gguf_q8_0-00006-of-00006.gguf
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:33e29a41848004f2edc3bd55c7512b91fc6fdecbbe5bfcaaa75aeb85a714cc19
|
| 3 |
+
size 9299006400
|