Text Generation
Transformers
PyTorch
English
Chinese
mistral
qwen
qwen1.5
qwen2
conversational
text-generation-inference
Instructions to use Minami-su/Qwen1.5-7B-Chat_mistral with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Minami-su/Qwen1.5-7B-Chat_mistral with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="Minami-su/Qwen1.5-7B-Chat_mistral") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("Minami-su/Qwen1.5-7B-Chat_mistral") model = AutoModelForCausalLM.from_pretrained("Minami-su/Qwen1.5-7B-Chat_mistral") 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]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps
- vLLM
How to use Minami-su/Qwen1.5-7B-Chat_mistral with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "Minami-su/Qwen1.5-7B-Chat_mistral" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Minami-su/Qwen1.5-7B-Chat_mistral", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/Minami-su/Qwen1.5-7B-Chat_mistral
- SGLang
How to use Minami-su/Qwen1.5-7B-Chat_mistral 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 "Minami-su/Qwen1.5-7B-Chat_mistral" \ --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": "Minami-su/Qwen1.5-7B-Chat_mistral", "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 "Minami-su/Qwen1.5-7B-Chat_mistral" \ --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": "Minami-su/Qwen1.5-7B-Chat_mistral", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use Minami-su/Qwen1.5-7B-Chat_mistral with Docker Model Runner:
docker model run hf.co/Minami-su/Qwen1.5-7B-Chat_mistral
Upload 8 files
Browse files- pytorch_model-00001-of-00008.bin +3 -0
- pytorch_model-00002-of-00008.bin +3 -0
- pytorch_model-00003-of-00008.bin +3 -0
- pytorch_model-00004-of-00008.bin +3 -0
- pytorch_model-00005-of-00008.bin +3 -0
- pytorch_model-00006-of-00008.bin +3 -0
- pytorch_model-00007-of-00008.bin +3 -0
- pytorch_model-00008-of-00008.bin +3 -0
pytorch_model-00001-of-00008.bin
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:7a6c51619caffe77ea1e294a1a10497c563a55b18684937f5bd2653753449c4f
|
| 3 |
+
size 1990464810
|
pytorch_model-00002-of-00008.bin
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:a494c95534b083e5119f3b4b065061b0fd46f5e29affafc102e3be571e7fa084
|
| 3 |
+
size 1967396412
|
pytorch_model-00003-of-00008.bin
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:5076c332048d8bb109b633fcc8598ef6a427901b5f0dddc4abe734e70faae148
|
| 3 |
+
size 1987150170
|
pytorch_model-00004-of-00008.bin
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:318bb3e54428eb560c9ca1e279b50ddf02f7e8800f1d3f4cc513b7772848e3d5
|
| 3 |
+
size 1967387882
|
pytorch_model-00005-of-00008.bin
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:543e22cbb353c7bac8e46f8b543053a18382264152781cfaa6c8fe27882464de
|
| 3 |
+
size 1953578404
|
pytorch_model-00006-of-00008.bin
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:5407cbb5acf34777296f7b9210660017da611730f76063f352c020f292407c67
|
| 3 |
+
size 1979952784
|
pytorch_model-00007-of-00008.bin
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:ce7773b08390dff5976123d0c0dbf06e3725d10813a585ce10aa81633a3eaf16
|
| 3 |
+
size 1933841706
|
pytorch_model-00008-of-00008.bin
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:68e5e7f2a70144140d17ec505543c35d951ed01a65e4930155372f46017dafdc
|
| 3 |
+
size 1663282494
|