Text Generation
Transformers
PyTorch
English
Chinese
llama
llama2
qwen
causallm
text-generation-inference
Instructions to use CausalLM/14B with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use CausalLM/14B with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="CausalLM/14B")# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("CausalLM/14B") model = AutoModelForCausalLM.from_pretrained("CausalLM/14B") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use CausalLM/14B with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "CausalLM/14B" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "CausalLM/14B", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/CausalLM/14B
- SGLang
How to use CausalLM/14B 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 "CausalLM/14B" \ --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": "CausalLM/14B", "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 "CausalLM/14B" \ --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": "CausalLM/14B", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use CausalLM/14B with Docker Model Runner:
docker model run hf.co/CausalLM/14B
Commit ·
4fc249a
1
Parent(s): 6e22353
Update README.md
Browse files
README.md
CHANGED
|
@@ -101,29 +101,29 @@ Hard ACC:54.71
|
|
| 101 |
**系统提示不能为空!**
|
| 102 |
|
| 103 |
## MMLU:
|
| 104 |
-
STEM准确率:
|
| 105 |
|
| 106 |
-
人文学科准确率:
|
| 107 |
|
| 108 |
-
其他准确率:
|
| 109 |
|
| 110 |
-
社会学准确率:
|
| 111 |
|
| 112 |
-
平均准确率:
|
| 113 |
|
| 114 |
## CEval(验证集):
|
| 115 |
-
STEM准确率:
|
| 116 |
|
| 117 |
-
社会科学准确率:
|
| 118 |
|
| 119 |
-
人文学科准确率:
|
| 120 |
|
| 121 |
-
其他准确率:
|
| 122 |
|
| 123 |
-
困难准确率:
|
| 124 |
|
| 125 |
-
**平均准确率:
|
| 126 |
|
| 127 |
## GSM8K
|
| 128 |
|
| 129 |
-
**零样本准确率0.
|
|
|
|
| 101 |
**系统提示不能为空!**
|
| 102 |
|
| 103 |
## MMLU:
|
| 104 |
+
STEM准确率:64.19
|
| 105 |
|
| 106 |
+
人文及艺术学科准确率:61.40
|
| 107 |
|
| 108 |
+
其他学科准确率:71.64
|
| 109 |
|
| 110 |
+
社会学科准确率:75.37
|
| 111 |
|
| 112 |
+
**平均准确率:67.36**(超过所有70B以下的模型,非常接近最佳70B微调模型)
|
| 113 |
|
| 114 |
## CEval(验证集):
|
| 115 |
+
STEM准确率:66.71
|
| 116 |
|
| 117 |
+
社会科学准确率:85.10
|
| 118 |
|
| 119 |
+
人文学科准确率:76.68
|
| 120 |
|
| 121 |
+
其他学科准确率:70.23
|
| 122 |
|
| 123 |
+
困难准确率:54.71
|
| 124 |
|
| 125 |
+
**平均准确率:73.10**(超过Qwen-14B和GPT-4)
|
| 126 |
|
| 127 |
## GSM8K
|
| 128 |
|
| 129 |
+
**零样本准确率0.7012888551933283**(超过MetaMath-13B和Qwen-14B)
|