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.8-qwen2-7b with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use MaziyarPanahi/calme-2.8-qwen2-7b with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="MaziyarPanahi/calme-2.8-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.8-qwen2-7b") model = AutoModelForMultimodalLM.from_pretrained("MaziyarPanahi/calme-2.8-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.8-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.8-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.8-qwen2-7b", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/MaziyarPanahi/calme-2.8-qwen2-7b
- SGLang
How to use MaziyarPanahi/calme-2.8-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.8-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.8-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.8-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.8-qwen2-7b", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use MaziyarPanahi/calme-2.8-qwen2-7b with Docker Model Runner:
docker model run hf.co/MaziyarPanahi/calme-2.8-qwen2-7b
Update README.md (#10)
Browse files- Update README.md (b08fbd263a8720f7c66492c18b03b3e22b23e5ae)
README.md
CHANGED
|
@@ -18,7 +18,7 @@ inference: false
|
|
| 18 |
model_creator: MaziyarPanahi
|
| 19 |
quantized_by: MaziyarPanahi
|
| 20 |
base_model: Qwen/Qwen2-7B
|
| 21 |
-
model_name:
|
| 22 |
datasets:
|
| 23 |
- nvidia/HelpSteer2
|
| 24 |
- teknium/OpenHermes-2.5
|
|
@@ -28,13 +28,13 @@ datasets:
|
|
| 28 |
|
| 29 |
<img src="./qwen2-fine-tunes-maziyar-panahi.webp" alt="Qwen2 fine-tune" width="500" style="margin-left:'auto' margin-right:'auto' display:'block'"/>
|
| 30 |
|
| 31 |
-
# MaziyarPanahi/
|
| 32 |
|
| 33 |
This is a fine-tuned version of the `Qwen/Qwen2-7B` model. It aims to improve the base model across all benchmarks.
|
| 34 |
|
| 35 |
# ⚡ Quantized GGUF
|
| 36 |
|
| 37 |
-
All GGUF models are available here: [MaziyarPanahi/
|
| 38 |
|
| 39 |
# 🏆 [Open LLM Leaderboard Evaluation Results](https://huggingface.co/spaces/HuggingFaceH4/open_llm_leaderboard)
|
| 40 |
|
|
@@ -68,7 +68,7 @@ from transformers import pipeline
|
|
| 68 |
messages = [
|
| 69 |
{"role": "user", "content": "Who are you?"},
|
| 70 |
]
|
| 71 |
-
pipe = pipeline("text-generation", model="MaziyarPanahi/
|
| 72 |
pipe(messages)
|
| 73 |
|
| 74 |
|
|
@@ -76,6 +76,6 @@ pipe(messages)
|
|
| 76 |
|
| 77 |
from transformers import AutoTokenizer, AutoModelForCausalLM
|
| 78 |
|
| 79 |
-
tokenizer = AutoTokenizer.from_pretrained("MaziyarPanahi/
|
| 80 |
-
model = AutoModelForCausalLM.from_pretrained("MaziyarPanahi/
|
| 81 |
```
|
|
|
|
| 18 |
model_creator: MaziyarPanahi
|
| 19 |
quantized_by: MaziyarPanahi
|
| 20 |
base_model: Qwen/Qwen2-7B
|
| 21 |
+
model_name: calme-2.8-qwen2-7b
|
| 22 |
datasets:
|
| 23 |
- nvidia/HelpSteer2
|
| 24 |
- teknium/OpenHermes-2.5
|
|
|
|
| 28 |
|
| 29 |
<img src="./qwen2-fine-tunes-maziyar-panahi.webp" alt="Qwen2 fine-tune" width="500" style="margin-left:'auto' margin-right:'auto' display:'block'"/>
|
| 30 |
|
| 31 |
+
# MaziyarPanahi/calme-2.8-qwen2-7b
|
| 32 |
|
| 33 |
This is a fine-tuned version of the `Qwen/Qwen2-7B` model. It aims to improve the base model across all benchmarks.
|
| 34 |
|
| 35 |
# ⚡ Quantized GGUF
|
| 36 |
|
| 37 |
+
All GGUF models are available here: [MaziyarPanahi/calme-2.8-qwen2-7b-GGUF](https://huggingface.co/MaziyarPanahi/calme-2.8-qwen2-7b-GGUF)
|
| 38 |
|
| 39 |
# 🏆 [Open LLM Leaderboard Evaluation Results](https://huggingface.co/spaces/HuggingFaceH4/open_llm_leaderboard)
|
| 40 |
|
|
|
|
| 68 |
messages = [
|
| 69 |
{"role": "user", "content": "Who are you?"},
|
| 70 |
]
|
| 71 |
+
pipe = pipeline("text-generation", model="MaziyarPanahi/calme-2.8-qwen2-7b")
|
| 72 |
pipe(messages)
|
| 73 |
|
| 74 |
|
|
|
|
| 76 |
|
| 77 |
from transformers import AutoTokenizer, AutoModelForCausalLM
|
| 78 |
|
| 79 |
+
tokenizer = AutoTokenizer.from_pretrained("MaziyarPanahi/calme-2.8-qwen2-7b")
|
| 80 |
+
model = AutoModelForCausalLM.from_pretrained("MaziyarPanahi/calme-2.8-qwen2-7b")
|
| 81 |
```
|