Text Generation
Transformers
Safetensors
Chinese
qwen2
medical
conversational
text-generation-inference
Instructions to use jun10k/Qwen1.5-7B-MeChat with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use jun10k/Qwen1.5-7B-MeChat with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="jun10k/Qwen1.5-7B-MeChat") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("jun10k/Qwen1.5-7B-MeChat") model = AutoModelForCausalLM.from_pretrained("jun10k/Qwen1.5-7B-MeChat") 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 jun10k/Qwen1.5-7B-MeChat with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "jun10k/Qwen1.5-7B-MeChat" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "jun10k/Qwen1.5-7B-MeChat", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/jun10k/Qwen1.5-7B-MeChat
- SGLang
How to use jun10k/Qwen1.5-7B-MeChat 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 "jun10k/Qwen1.5-7B-MeChat" \ --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": "jun10k/Qwen1.5-7B-MeChat", "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 "jun10k/Qwen1.5-7B-MeChat" \ --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": "jun10k/Qwen1.5-7B-MeChat", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use jun10k/Qwen1.5-7B-MeChat with Docker Model Runner:
docker model run hf.co/jun10k/Qwen1.5-7B-MeChat
Update README.md
Browse files
README.md
CHANGED
|
@@ -1,3 +1,28 @@
|
|
| 1 |
---
|
| 2 |
license: apache-2.0
|
|
|
|
|
|
|
|
|
|
|
|
|
| 3 |
---
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
---
|
| 2 |
license: apache-2.0
|
| 3 |
+
language:
|
| 4 |
+
- zh
|
| 5 |
+
tags:
|
| 6 |
+
- medical
|
| 7 |
---
|
| 8 |
+
|
| 9 |
+
本项目是用Qwen1.5-7B为基础,使用心理健康对话数据集实现微调。仅用于技术研究用途。
|
| 10 |
+
|
| 11 |
+
|
| 12 |
+

|
| 13 |
+
|
| 14 |
+
## 引用
|
| 15 |
+
|
| 16 |
+
本项目的使用来自中文心理健康支持对话 · 数据集(SmileChat)
|
| 17 |
+
其具体信息如下
|
| 18 |
+
|
| 19 |
+
```
|
| 20 |
+
@misc{qiu2023smile,
|
| 21 |
+
title={SMILE: Single-turn to Multi-turn Inclusive Language Expansion via ChatGPT for Mental Health Support},
|
| 22 |
+
author={Huachuan Qiu and Hongliang He and Shuai Zhang and Anqi Li and Zhenzhong Lan},
|
| 23 |
+
year={2023},
|
| 24 |
+
eprint={2305.00450},
|
| 25 |
+
archivePrefix={arXiv},
|
| 26 |
+
primaryClass={cs.CL}
|
| 27 |
+
}
|
| 28 |
+
```
|