Instructions to use switzerchees/Reasoning-Medical-27B-NVFP4 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use switzerchees/Reasoning-Medical-27B-NVFP4 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-text-to-text", model="switzerchees/Reasoning-Medical-27B-NVFP4") messages = [ { "role": "user", "content": [ {"type": "image", "url": "https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/p-blog/candy.JPG"}, {"type": "text", "text": "What animal is on the candy?"} ] }, ] pipe(text=messages)# Load model directly from transformers import AutoProcessor, AutoModelForMultimodalLM processor = AutoProcessor.from_pretrained("switzerchees/Reasoning-Medical-27B-NVFP4") model = AutoModelForMultimodalLM.from_pretrained("switzerchees/Reasoning-Medical-27B-NVFP4") messages = [ { "role": "user", "content": [ {"type": "image", "url": "https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/p-blog/candy.JPG"}, {"type": "text", "text": "What animal is on the candy?"} ] }, ] inputs = processor.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(processor.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use switzerchees/Reasoning-Medical-27B-NVFP4 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "switzerchees/Reasoning-Medical-27B-NVFP4" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "switzerchees/Reasoning-Medical-27B-NVFP4", "messages": [ { "role": "user", "content": [ { "type": "text", "text": "Describe this image in one sentence." }, { "type": "image_url", "image_url": { "url": "https://cdn.britannica.com/61/93061-050-99147DCE/Statue-of-Liberty-Island-New-York-Bay.jpg" } } ] } ] }'Use Docker
docker model run hf.co/switzerchees/Reasoning-Medical-27B-NVFP4
- SGLang
How to use switzerchees/Reasoning-Medical-27B-NVFP4 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 "switzerchees/Reasoning-Medical-27B-NVFP4" \ --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": "switzerchees/Reasoning-Medical-27B-NVFP4", "messages": [ { "role": "user", "content": [ { "type": "text", "text": "Describe this image in one sentence." }, { "type": "image_url", "image_url": { "url": "https://cdn.britannica.com/61/93061-050-99147DCE/Statue-of-Liberty-Island-New-York-Bay.jpg" } } ] } ] }'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 "switzerchees/Reasoning-Medical-27B-NVFP4" \ --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": "switzerchees/Reasoning-Medical-27B-NVFP4", "messages": [ { "role": "user", "content": [ { "type": "text", "text": "Describe this image in one sentence." }, { "type": "image_url", "image_url": { "url": "https://cdn.britannica.com/61/93061-050-99147DCE/Statue-of-Liberty-Island-New-York-Bay.jpg" } } ] } ] }' - Docker Model Runner
How to use switzerchees/Reasoning-Medical-27B-NVFP4 with Docker Model Runner:
docker model run hf.co/switzerchees/Reasoning-Medical-27B-NVFP4
Reasoning-Medical-27B-NVFP4
Blackwell-oriented ModelOpt quantization of
EpistemeAI/Reasoning-Medical-27B, pinned to revision
e5cfbcc2498df44c07124f670a75c77179fc8e67. The exported safetensors total 21.92 GB.
Quantization
- NVIDIA Model Optimizer:
0.45.0 - Recipe:
huggingface/qwen3_5/ptq/w4a16_nvfp4-fp8_attn-kv_fp8_cast - MLP projections and
lm_head: W4A16 NVFP4 - Self-attention and the large linear-attention projections: FP8
- KV cache metadata: FP8 cast
- Preserved at source precision: vision tower, MTP, convolution and sensitive Gated-DeltaNet projections selected by the NVIDIA recipe
- Calibration: 512 CNN/DailyMail text samples of at most 512 tokens; medical benchmark cases were not used
- Source license: Apache-2.0
Full provenance and SHA-256 hashes are in quantization_manifest.json.
vLLM
vllm serve switzerchees/Reasoning-Medical-27B-NVFP4 \
--served-model-name EpistemeAI/Reasoning-Medical-27B \
--quantization modelopt \
--kv-cache-dtype bfloat16 \
--max-model-len 32768 \
--reasoning-parser qwen3 \
--limit-mm-per-prompt '{"image": 1, "video": 0}'
BF16 KV cache is recommended for accuracy and is forced explicitly above. The
exported recipe contains FP8 KV-cache metadata; with vLLM 0.23, leaving the flag
at auto therefore selects FP8 rather than the model's BF16 dtype. FP8 KV serving
should be treated as a separate accuracy/performance trade-off and validated for
the target runtime.
Limitations and safety
This quantized derivative has not been clinically validated. The upstream model card reports medical benchmarks but no independent clinical validation and no substantive medical-image benchmark. Quantization can introduce additional errors. Do not use this model as a substitute for a physician, for autonomous diagnosis, or for treatment decisions. German-language quality is evaluated separately and is not implied by the upstream model's English language tag.
- Downloads last month
- -
Model tree for switzerchees/Reasoning-Medical-27B-NVFP4
Base model
Qwen/Qwen3.6-27B