Instructions to use ayuag/yukt-med with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use ayuag/yukt-med with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="ayuag/yukt-med")# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("ayuag/yukt-med") model = AutoModelForCausalLM.from_pretrained("ayuag/yukt-med") - llama-cpp-python
How to use ayuag/yukt-med with llama-cpp-python:
# !pip install llama-cpp-python from llama_cpp import Llama llm = Llama.from_pretrained( repo_id="ayuag/yukt-med", filename="yukt-med-Q4_K_M.gguf", )
output = llm( "Once upon a time,", max_tokens=512, echo=True ) print(output)
- Inference
- Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- llama.cpp
How to use ayuag/yukt-med with llama.cpp:
Install from brew
brew install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama-server -hf ayuag/yukt-med:Q4_K_M # Run inference directly in the terminal: llama-cli -hf ayuag/yukt-med:Q4_K_M
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama-server -hf ayuag/yukt-med:Q4_K_M # Run inference directly in the terminal: llama-cli -hf ayuag/yukt-med:Q4_K_M
Use pre-built binary
# Download pre-built binary from: # https://github.com/ggerganov/llama.cpp/releases # Start a local OpenAI-compatible server with a web UI: ./llama-server -hf ayuag/yukt-med:Q4_K_M # Run inference directly in the terminal: ./llama-cli -hf ayuag/yukt-med:Q4_K_M
Build from source code
git clone https://github.com/ggerganov/llama.cpp.git cd llama.cpp cmake -B build cmake --build build -j --target llama-server llama-cli # Start a local OpenAI-compatible server with a web UI: ./build/bin/llama-server -hf ayuag/yukt-med:Q4_K_M # Run inference directly in the terminal: ./build/bin/llama-cli -hf ayuag/yukt-med:Q4_K_M
Use Docker
docker model run hf.co/ayuag/yukt-med:Q4_K_M
- LM Studio
- Jan
- vLLM
How to use ayuag/yukt-med with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "ayuag/yukt-med" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "ayuag/yukt-med", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/ayuag/yukt-med:Q4_K_M
- SGLang
How to use ayuag/yukt-med 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 "ayuag/yukt-med" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "ayuag/yukt-med", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'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 "ayuag/yukt-med" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "ayuag/yukt-med", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Ollama
How to use ayuag/yukt-med with Ollama:
ollama run hf.co/ayuag/yukt-med:Q4_K_M
- Unsloth Studio
How to use ayuag/yukt-med 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 ayuag/yukt-med 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 ayuag/yukt-med to start chatting
Using HuggingFace Spaces for Unsloth
# No setup required # Open https://huggingface.co/spaces/unsloth/studio in your browser # Search for ayuag/yukt-med to start chatting
- Docker Model Runner
How to use ayuag/yukt-med with Docker Model Runner:
docker model run hf.co/ayuag/yukt-med:Q4_K_M
- Lemonade
How to use ayuag/yukt-med with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull ayuag/yukt-med:Q4_K_M
Run and chat with the model
lemonade run user.yukt-med-Q4_K_M
List all available models
lemonade list
🩺 Yukt-Med (Phi-2 Medical Assistant)
Your Compact, Specialized Medical Knowledge Companion.
Fine-tuned on 86,000+ curated medical interactions to provide concise, accurate, and non-diagnostic healthcare information.
🌟 Overview
Yukt-Med is a lightweight, state-of-the-art language model designed for the medical and healthcare domain. It is fine-tuned using LoRA (Low-Rank Adaptation) on a diverse collection of healthcare datasets.
What makes Yukt-Med unique is its balance of performance and efficiency. While powerful, it has been quantized to 4-bit GGUF, making it runnable on commodity hardware, mobile devices, and in offline environments.
💡 Perfect for: Rapid medical information retrieval, symptom analysis support, and educational purposes. Not for diagnosis.
🚀 Key Features
| Feature | Description |
|---|---|
| 🧠 Specialized Brain | Trained on ChatDoctor, MedQuad, and curated drug databases. |
| ⚡ Ultra-Efficient | GGUF version runs smoothly on 4GB RAM (CPU/Mobile). |
| Instruction-Following | Responds accurately to instructions using a specific prompt template. |
| 🌐 Production-Ready | Available in Standard Safetensors and Compact GGUF formats. |
📊 Training Data
The model's knowledge comes from over 86,800 cleaned and structured examples:
- ChatDoctor Dataset: Real-world patient-doctor dialogues for conversational medical advice.
- MedQuad Dataset: Large-scale Medical Question-Answering pairs.
- Drugs & Side Effects: Detailed information on pharmaceuticals.
- Symptom-Disease Mapping: Patterns for common medical conditions.
(Note: Data was filtered to ensure high-quality, safe, and factual content.)
🧪 Evaluation Examples
Compare Yukt-Med's focused medical responses:
| Instruction (Prompt) | Yukt-Med Response (Generation) |
|---|---|
| ### Instruction: What are the common symptoms of a common cold? ### Response: |
The common symptoms of a common cold include a runny or stuffy nose, sneezing, sore throat, cough, and mild body aches or fatigue. |
| ### Instruction: Tell me about the side effects of Aspirin. ### Response: |
The most frequent side effects are bleeding and stomach upset. |
🛠️ Usage Instructions
1. Using Standard Transformers (Python/GPU)
from transformers import AutoModelForCausalLM, AutoTokenizer
import torch
model_id = "ayuag/yukt-med"
tokenizer = AutoTokenizer.from_pretrained(model_id)
model = AutoModelForCausalLM.from_pretrained(model_id, torch_dtype=torch.bfloat16, device_map="auto", trust_remote_code=True)
def ask_medical_bot(question):
prompt = f"### Instruction: {question}\n### Response:"
inputs = tokenizer(prompt, return_tensors="pt").to("cuda")
outputs = model.generate(**inputs, max_new_tokens=200, do_sample=True, temperature=0.7)
return tokenizer.decode(outputs[0], skip_special_tokens=True)
print(ask_medical_bot("What are symptoms of Malaria?"))
- Downloads last month
- 5
Model tree for ayuag/yukt-med
Base model
microsoft/phi-2