Instructions to use CloveAI/clov-medchat with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- PEFT
How to use CloveAI/clov-medchat with PEFT:
from peft import PeftModel from transformers import AutoModelForCausalLM base_model = AutoModelForCausalLM.from_pretrained("unsloth/mistral-7b-instruct-v0.2-bnb-4bit") model = PeftModel.from_pretrained(base_model, "CloveAI/clov-medchat") - Transformers
How to use CloveAI/clov-medchat with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="CloveAI/clov-medchat") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("CloveAI/clov-medchat", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use CloveAI/clov-medchat with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "CloveAI/clov-medchat" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "CloveAI/clov-medchat", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/CloveAI/clov-medchat
- SGLang
How to use CloveAI/clov-medchat 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 "CloveAI/clov-medchat" \ --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": "CloveAI/clov-medchat", "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 "CloveAI/clov-medchat" \ --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": "CloveAI/clov-medchat", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Unsloth Studio
How to use CloveAI/clov-medchat with Unsloth Studio:
Install Unsloth Studio (macOS, Linux, WSL)
curl -fsSL https://unsloth.ai/install.sh | sh # Run unsloth studio unsloth studio -H 0.0.0.0 -p 8888 # Then open http://localhost:8888 in your browser # Search for CloveAI/clov-medchat to start chatting
Install Unsloth Studio (Windows)
irm https://unsloth.ai/install.ps1 | iex # Run unsloth studio unsloth studio -H 0.0.0.0 -p 8888 # Then open http://localhost:8888 in your browser # Search for CloveAI/clov-medchat to start chatting
Using HuggingFace Spaces for Unsloth
# No setup required # Open https://huggingface.co/spaces/unsloth/studio in your browser # Search for CloveAI/clov-medchat to start chatting
Load model with FastModel
pip install unsloth from unsloth import FastModel model, tokenizer = FastModel.from_pretrained( model_name="CloveAI/clov-medchat", max_seq_length=2048, ) - Docker Model Runner
How to use CloveAI/clov-medchat with Docker Model Runner:
docker model run hf.co/CloveAI/clov-medchat
Alan Joshua commited on
Update README.md
Browse files
README.md
CHANGED
|
@@ -52,14 +52,29 @@ response = generated_text.replace(prompt, "").strip()
|
|
| 52 |
print(response)
|
| 53 |
```
|
| 54 |
|
|
|
|
|
|
|
| 55 |
## Model Details
|
| 56 |
|
| 57 |
-
|
| 58 |
-
|
| 59 |
-
|
| 60 |
-
|
| 61 |
-
|
| 62 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 63 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 64 |
|
| 65 |
-
|
|
|
|
| 52 |
print(response)
|
| 53 |
```
|
| 54 |
|
| 55 |
+
---
|
| 56 |
+
|
| 57 |
## Model Details
|
| 58 |
|
| 59 |
+
* **Developed by:** Alan Joshua
|
| 60 |
+
* **Model type:** Text-Generation
|
| 61 |
+
* **Language(s):** English
|
| 62 |
+
* **License:** MIT
|
| 63 |
+
* **Finetuned from model:** unsloth/mistral-7b-instruct-v0.2-bnb-4bit
|
| 64 |
+
* **Dataset:** ruslanmv/ai-medical-chatbot
|
| 65 |
+
|
| 66 |
+
---
|
| 67 |
+
|
| 68 |
+
## Model Description
|
| 69 |
+
|
| 70 |
+
This model is a **medical chatbot** fine-tuned on the `ruslanmv/ai-medical-chatbot` dataset using LoRA adapters on the Mistral 7B instruct model (4-bit). It is designed to provide **accurate, easy-to-understand medical information** in English.
|
| 71 |
+
|
| 72 |
+
Key features of this model include:
|
| 73 |
|
| 74 |
+
* **Structured Markdown responses:** Answers are formatted using bullets, numbered lists, tables, and horizontal lines for readability.
|
| 75 |
+
* **Clear explanations:** Medical terms are explained in simple words for users of all backgrounds.
|
| 76 |
+
* **Emojis:** Used to highlight key points and make responses more engaging.
|
| 77 |
+
* **No links or images:** Ensures responses remain text-only for safe, direct answers.
|
| 78 |
+
* **Complete answers:** Designed to generate full, coherent responses without cutting off mid-sentence.
|
| 79 |
|
| 80 |
+
This model is suitable for educational purposes, healthcare awareness, and interactive Q&A applications. **It is not a substitute for professional medical advice.** Always verify information with a qualified healthcare provider.
|