Text Generation
Transformers
PyTorch
English
Chinese
llama
llama2
qwen
causallm
text-generation-inference
Instructions to use CausalLM/7B with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use CausalLM/7B with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="CausalLM/7B")# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("CausalLM/7B") model = AutoModelForCausalLM.from_pretrained("CausalLM/7B") - Notebooks
- Google Colab
- Kaggle
- Local Apps
- vLLM
How to use CausalLM/7B with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "CausalLM/7B" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "CausalLM/7B", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/CausalLM/7B
- SGLang
How to use CausalLM/7B 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/7B" \ --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/7B", "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/7B" \ --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/7B", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use CausalLM/7B with Docker Model Runner:
docker model run hf.co/CausalLM/7B
Commit ·
b430829
1
Parent(s): d3aecca
Update README.md
Browse files
README.md
CHANGED
|
@@ -42,6 +42,9 @@ Please note that the model was trained on unfiltered internet data. Since we do
|
|
| 42 |
|
| 43 |
Bonus: The model underwent some fine-tuning on the prompt format introduced in LLaVA1.5 that is unrelated to image attention calculation. Therefore, aligning the ViT Projection module with frozen LMunder visual instructions would enable rapid implementation of effective multimodal capabilities.
|
| 44 |
|
|
|
|
|
|
|
|
|
|
| 45 |
## MMLU:
|
| 46 |
stem ACC: 56.83
|
| 47 |
|
|
@@ -54,17 +57,17 @@ social ACC: 72.41
|
|
| 54 |
**AVERAGE ACC:63.82**
|
| 55 |
|
| 56 |
## CEval (Val):
|
| 57 |
-
STEM
|
| 58 |
|
| 59 |
-
Social Science
|
| 60 |
|
| 61 |
-
Humanities
|
| 62 |
|
| 63 |
-
Other
|
| 64 |
|
| 65 |
-
Hard
|
| 66 |
|
| 67 |
-
**AVERAGE
|
| 68 |
|
| 69 |
## GSM8K
|
| 70 |
|
|
|
|
| 42 |
|
| 43 |
Bonus: The model underwent some fine-tuning on the prompt format introduced in LLaVA1.5 that is unrelated to image attention calculation. Therefore, aligning the ViT Projection module with frozen LMunder visual instructions would enable rapid implementation of effective multimodal capabilities.
|
| 44 |
|
| 45 |
+
## PROMPT FORMAT:
|
| 46 |
+
[chatml](https://github.com/openai/openai-python/blob/main/chatml.md)
|
| 47 |
+
|
| 48 |
## MMLU:
|
| 49 |
stem ACC: 56.83
|
| 50 |
|
|
|
|
| 57 |
**AVERAGE ACC:63.82**
|
| 58 |
|
| 59 |
## CEval (Val):
|
| 60 |
+
STEM acc: 61.67
|
| 61 |
|
| 62 |
+
Social Science acc: 81.94
|
| 63 |
|
| 64 |
+
Humanities acc: 77.19
|
| 65 |
|
| 66 |
+
Other acc: 68.35
|
| 67 |
|
| 68 |
+
Hard acc:48.03
|
| 69 |
|
| 70 |
+
**AVERAGE acc:70.27**
|
| 71 |
|
| 72 |
## GSM8K
|
| 73 |
|