Text Generation
Transformers
Safetensors
English
qwen2
chat
qwen
finetune
chatml
OpenHermes-2.5
HelpSteer2
Orca
SlimOrca
conversational
Eval Results (legacy)
text-generation-inference
Instructions to use MaziyarPanahi/calme-2.1-qwen2-7b with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use MaziyarPanahi/calme-2.1-qwen2-7b with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="MaziyarPanahi/calme-2.1-qwen2-7b") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForMultimodalLM tokenizer = AutoTokenizer.from_pretrained("MaziyarPanahi/calme-2.1-qwen2-7b") model = AutoModelForMultimodalLM.from_pretrained("MaziyarPanahi/calme-2.1-qwen2-7b") 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
- vLLM
How to use MaziyarPanahi/calme-2.1-qwen2-7b with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "MaziyarPanahi/calme-2.1-qwen2-7b" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "MaziyarPanahi/calme-2.1-qwen2-7b", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/MaziyarPanahi/calme-2.1-qwen2-7b
- SGLang
How to use MaziyarPanahi/calme-2.1-qwen2-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 "MaziyarPanahi/calme-2.1-qwen2-7b" \ --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": "MaziyarPanahi/calme-2.1-qwen2-7b", "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 "MaziyarPanahi/calme-2.1-qwen2-7b" \ --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": "MaziyarPanahi/calme-2.1-qwen2-7b", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use MaziyarPanahi/calme-2.1-qwen2-7b with Docker Model Runner:
docker model run hf.co/MaziyarPanahi/calme-2.1-qwen2-7b
Update README.md
#8
by MaziyarPanahi - opened
README.md
CHANGED
|
@@ -131,9 +131,19 @@ This is a fine-tuned version of the `Qwen/Qwen2-7B` model. It aims to improve th
|
|
| 131 |
|
| 132 |
All GGUF models are available here: [MaziyarPanahi/calme-2.1-qwen2-7b](https://huggingface.co/MaziyarPanahi/calme-2.1-qwen2-7b)
|
| 133 |
|
| 134 |
-
# 🏆 [Open LLM Leaderboard Evaluation Results](https://huggingface.co/spaces/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 135 |
|
| 136 |
-
coming soon!
|
| 137 |
|
| 138 |
|
| 139 |
# Prompt Template
|
|
@@ -174,16 +184,3 @@ from transformers import AutoTokenizer, AutoModelForCausalLM
|
|
| 174 |
tokenizer = AutoTokenizer.from_pretrained("MaziyarPanahi/calme-2.1-qwen2-7b")
|
| 175 |
model = AutoModelForCausalLM.from_pretrained("MaziyarPanahi/calme-2.1-qwen2-7b")
|
| 176 |
```
|
| 177 |
-
# [Open LLM Leaderboard Evaluation Results](https://huggingface.co/spaces/open-llm-leaderboard/open_llm_leaderboard)
|
| 178 |
-
Detailed results can be found [here](https://huggingface.co/datasets/open-llm-leaderboard/details_MaziyarPanahi__calme-2.1-qwen2-7b)
|
| 179 |
-
|
| 180 |
-
| Metric |Value|
|
| 181 |
-
|-------------------|----:|
|
| 182 |
-
|Avg. |23.20|
|
| 183 |
-
|IFEval (0-Shot) |38.16|
|
| 184 |
-
|BBH (3-Shot) |31.01|
|
| 185 |
-
|MATH Lvl 5 (4-Shot)|21.07|
|
| 186 |
-
|GPQA (0-shot) | 5.26|
|
| 187 |
-
|MuSR (0-shot) |13.80|
|
| 188 |
-
|MMLU-PRO (5-shot) |29.92|
|
| 189 |
-
|
|
|
|
| 131 |
|
| 132 |
All GGUF models are available here: [MaziyarPanahi/calme-2.1-qwen2-7b](https://huggingface.co/MaziyarPanahi/calme-2.1-qwen2-7b)
|
| 133 |
|
| 134 |
+
# 🏆 [Open LLM Leaderboard Evaluation Results](https://huggingface.co/spaces/open-llm-leaderboard/open_llm_leaderboard)
|
| 135 |
+
Detailed results can be found [here](https://huggingface.co/datasets/open-llm-leaderboard/details_MaziyarPanahi__calme-2.1-qwen2-7b)
|
| 136 |
+
|
| 137 |
+
| Metric |Value|
|
| 138 |
+
|-------------------|----:|
|
| 139 |
+
|Avg. |23.20|
|
| 140 |
+
|IFEval (0-Shot) |38.16|
|
| 141 |
+
|BBH (3-Shot) |31.01|
|
| 142 |
+
|MATH Lvl 5 (4-Shot)|21.07|
|
| 143 |
+
|GPQA (0-shot) | 5.26|
|
| 144 |
+
|MuSR (0-shot) |13.80|
|
| 145 |
+
|MMLU-PRO (5-shot) |29.92|
|
| 146 |
|
|
|
|
| 147 |
|
| 148 |
|
| 149 |
# Prompt Template
|
|
|
|
| 184 |
tokenizer = AutoTokenizer.from_pretrained("MaziyarPanahi/calme-2.1-qwen2-7b")
|
| 185 |
model = AutoModelForCausalLM.from_pretrained("MaziyarPanahi/calme-2.1-qwen2-7b")
|
| 186 |
```
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|