Instructions to use PradeepBodhi/BioMistral-7b_Fine-Tuned-QLoRA with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- PEFT
How to use PradeepBodhi/BioMistral-7b_Fine-Tuned-QLoRA with PEFT:
from peft import PeftModel from transformers import AutoModelForCausalLM base_model = AutoModelForCausalLM.from_pretrained("BioMistral/BioMistral-7B") model = PeftModel.from_pretrained(base_model, "PradeepBodhi/BioMistral-7b_Fine-Tuned-QLoRA") - Transformers
How to use PradeepBodhi/BioMistral-7b_Fine-Tuned-QLoRA with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="PradeepBodhi/BioMistral-7b_Fine-Tuned-QLoRA") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("PradeepBodhi/BioMistral-7b_Fine-Tuned-QLoRA", dtype="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps
- vLLM
How to use PradeepBodhi/BioMistral-7b_Fine-Tuned-QLoRA with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "PradeepBodhi/BioMistral-7b_Fine-Tuned-QLoRA" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "PradeepBodhi/BioMistral-7b_Fine-Tuned-QLoRA", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/PradeepBodhi/BioMistral-7b_Fine-Tuned-QLoRA
- SGLang
How to use PradeepBodhi/BioMistral-7b_Fine-Tuned-QLoRA 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 "PradeepBodhi/BioMistral-7b_Fine-Tuned-QLoRA" \ --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": "PradeepBodhi/BioMistral-7b_Fine-Tuned-QLoRA", "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 "PradeepBodhi/BioMistral-7b_Fine-Tuned-QLoRA" \ --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": "PradeepBodhi/BioMistral-7b_Fine-Tuned-QLoRA", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Unsloth Studio new
How to use PradeepBodhi/BioMistral-7b_Fine-Tuned-QLoRA 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 PradeepBodhi/BioMistral-7b_Fine-Tuned-QLoRA 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 PradeepBodhi/BioMistral-7b_Fine-Tuned-QLoRA to start chatting
Using HuggingFace Spaces for Unsloth
# No setup required # Open https://huggingface.co/spaces/unsloth/studio in your browser # Search for PradeepBodhi/BioMistral-7b_Fine-Tuned-QLoRA to start chatting
Load model with FastModel
pip install unsloth from unsloth import FastModel model, tokenizer = FastModel.from_pretrained( model_name="PradeepBodhi/BioMistral-7b_Fine-Tuned-QLoRA", max_seq_length=2048, ) - Docker Model Runner
How to use PradeepBodhi/BioMistral-7b_Fine-Tuned-QLoRA with Docker Model Runner:
docker model run hf.co/PradeepBodhi/BioMistral-7b_Fine-Tuned-QLoRA
BioMistral-7B Fine-Tuned (QLoRA)
This is a LoRA fine-tuned version of BioMistral/BioMistral-7B, trained using Unsloth for efficient supervised fine-tuning (SFT) on medical question-answer data.
It is optimized for clinical reasoning and healthcare-related text generation.
Model Details
- Base model: BioMistral/BioMistral-7B
- Fine-tuning method: QLoRA (4-bit) via PEFT
- Library: Transformers + TRL + Unsloth
- Language: English (medical domain)
- Intended use: Assistive medical Q&A (non-diagnostic, educational purposes only)
Example Usage
from transformers import pipeline, AutoTokenizer
model_path = "PradeepBodhi/BioMistral-7b_Fine-Tuned-QLoRA"
tokenizer = AutoTokenizer.from_pretrained(model_path)
pipe = pipeline("text-generation", model=model_path, tokenizer=tokenizer)
prompt = tokenizer.apply_chat_template([
{"role": "user", "content": "I have a sore throat and fever. What should I do?"}
], tokenize=False, add_generation_prompt=True)
output = pipe(prompt, max_new_tokens=1024, do_sample=True, temperature=0.7)
print(output[0]['generated_text'][len(prompt):].strip())
Training
- Technique: Supervised fine-tuning (SFT) with LoRA adapters
- Quantization: 4-bit QLoRA
- Framework versions: PEFT 0.16.0 Transformers 4.55.0 Unsloth 2025.8.4
- Downloads last month
- 1
Model tree for PradeepBodhi/BioMistral-7b_Fine-Tuned-QLoRA
Base model
BioMistral/BioMistral-7B