Text Generation
Transformers
PyTorch
English
Chinese
cn
llama
transformer
封神榜
text-generation-inference
Instructions to use IDEA-CCNL/Ziya2-13B-Base with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use IDEA-CCNL/Ziya2-13B-Base with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="IDEA-CCNL/Ziya2-13B-Base")# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("IDEA-CCNL/Ziya2-13B-Base") model = AutoModelForCausalLM.from_pretrained("IDEA-CCNL/Ziya2-13B-Base", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use IDEA-CCNL/Ziya2-13B-Base with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "IDEA-CCNL/Ziya2-13B-Base" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "IDEA-CCNL/Ziya2-13B-Base", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/IDEA-CCNL/Ziya2-13B-Base
- SGLang
How to use IDEA-CCNL/Ziya2-13B-Base 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 "IDEA-CCNL/Ziya2-13B-Base" \ --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": "IDEA-CCNL/Ziya2-13B-Base", "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 "IDEA-CCNL/Ziya2-13B-Base" \ --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": "IDEA-CCNL/Ziya2-13B-Base", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use IDEA-CCNL/Ziya2-13B-Base with Docker Model Runner:
docker model run hf.co/IDEA-CCNL/Ziya2-13B-Base
Update README.md
Browse files
README.md
CHANGED
|
@@ -1,26 +1,19 @@
|
|
| 1 |
---
|
| 2 |
tasks:
|
| 3 |
-
|
| 4 |
- text-generation
|
| 5 |
-
|
| 6 |
model_type:
|
| 7 |
-
|
| 8 |
- gpt
|
| 9 |
- llama
|
| 10 |
-
|
| 11 |
domain:
|
| 12 |
-
|
| 13 |
- nlp
|
| 14 |
-
|
| 15 |
language:
|
| 16 |
-
|
| 17 |
- en
|
| 18 |
- zh
|
| 19 |
- cn
|
| 20 |
-
|
| 21 |
tags:
|
| 22 |
- transformer
|
| 23 |
- 封神榜
|
|
|
|
| 24 |
---
|
| 25 |
# Ziya2-13B-Base
|
| 26 |
|
|
@@ -124,4 +117,4 @@ You can also cite our [website](https://github.com/IDEA-CCNL/Fengshenbang-LM/):
|
|
| 124 |
archivePrefix={arXiv},
|
| 125 |
primaryClass={cs.CL}
|
| 126 |
}
|
| 127 |
-
```
|
|
|
|
| 1 |
---
|
| 2 |
tasks:
|
|
|
|
| 3 |
- text-generation
|
|
|
|
| 4 |
model_type:
|
|
|
|
| 5 |
- gpt
|
| 6 |
- llama
|
|
|
|
| 7 |
domain:
|
|
|
|
| 8 |
- nlp
|
|
|
|
| 9 |
language:
|
|
|
|
| 10 |
- en
|
| 11 |
- zh
|
| 12 |
- cn
|
|
|
|
| 13 |
tags:
|
| 14 |
- transformer
|
| 15 |
- 封神榜
|
| 16 |
+
license: apache-2.0
|
| 17 |
---
|
| 18 |
# Ziya2-13B-Base
|
| 19 |
|
|
|
|
| 117 |
archivePrefix={arXiv},
|
| 118 |
primaryClass={cs.CL}
|
| 119 |
}
|
| 120 |
+
```
|