Instructions to use openlmlab/open-chinese-llama-7b-patch with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use openlmlab/open-chinese-llama-7b-patch with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="openlmlab/open-chinese-llama-7b-patch")# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("openlmlab/open-chinese-llama-7b-patch") model = AutoModelForCausalLM.from_pretrained("openlmlab/open-chinese-llama-7b-patch") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use openlmlab/open-chinese-llama-7b-patch with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "openlmlab/open-chinese-llama-7b-patch" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "openlmlab/open-chinese-llama-7b-patch", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/openlmlab/open-chinese-llama-7b-patch
- SGLang
How to use openlmlab/open-chinese-llama-7b-patch 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 "openlmlab/open-chinese-llama-7b-patch" \ --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": "openlmlab/open-chinese-llama-7b-patch", "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 "openlmlab/open-chinese-llama-7b-patch" \ --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": "openlmlab/open-chinese-llama-7b-patch", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use openlmlab/open-chinese-llama-7b-patch with Docker Model Runner:
docker model run hf.co/openlmlab/open-chinese-llama-7b-patch
Update SHA256.txt
Browse files- SHA256.txt +0 -1
SHA256.txt
CHANGED
|
@@ -9,7 +9,6 @@ a59f75c320a56ab8774f273e2f268017e0b829cfbeb5502c6a225231917b93ec ./pytorch_mode
|
|
| 9 |
411c03fea07854f781007c81db575b8acf9e0ca1d0e61762bbae98bcf184e3cb ./pytorch_model-18-of-32.bin
|
| 10 |
32413c53df5c611dffcde2acd7926c31c261989259815afb4b5ea5ab3ebbfff1 ./pytorch_model-2-of-32.bin
|
| 11 |
2cb898019faae79357b67e262e89769aa1e2ce22eb1d2f7356172e62148d91c0 ./pytorch_model-12-of-32.bin
|
| 12 |
-
db8e38953c358665b55fd09480a8cb32e23b3ad9eef77aa286b19f9218d19899 ./SHA256.txt
|
| 13 |
9905c8f9ceaa014f573ab35e8f02396bfcf3c0ee35179849990f53cb275f2cfb ./generation_config.json
|
| 14 |
40a428693975b8ea2dc4e04d182ee3d909d8d4074cee0fc5973d80c7d8b87dd9 ./pytorch_model-24-of-32.bin
|
| 15 |
6b8141ff03d1750cd8e36f9813dece966dcb60f85ab6e812f0f00748d60371c2 ./pytorch_model-13-of-32.bin
|
|
|
|
| 9 |
411c03fea07854f781007c81db575b8acf9e0ca1d0e61762bbae98bcf184e3cb ./pytorch_model-18-of-32.bin
|
| 10 |
32413c53df5c611dffcde2acd7926c31c261989259815afb4b5ea5ab3ebbfff1 ./pytorch_model-2-of-32.bin
|
| 11 |
2cb898019faae79357b67e262e89769aa1e2ce22eb1d2f7356172e62148d91c0 ./pytorch_model-12-of-32.bin
|
|
|
|
| 12 |
9905c8f9ceaa014f573ab35e8f02396bfcf3c0ee35179849990f53cb275f2cfb ./generation_config.json
|
| 13 |
40a428693975b8ea2dc4e04d182ee3d909d8d4074cee0fc5973d80c7d8b87dd9 ./pytorch_model-24-of-32.bin
|
| 14 |
6b8141ff03d1750cd8e36f9813dece966dcb60f85ab6e812f0f00748d60371c2 ./pytorch_model-13-of-32.bin
|