Downloads · 30 days
4
5% of all-time downloads
anjohn0077/NEXS-medical-lora
NEXS-medical-lora is a machine learning model from anjohn0077. Use it for the machine learning task on the model card, and read the license before you ship it in a product. It is set up for peft.
Rank-128 LoRA adapter for the medical domain, extracted with mergekit from TsinghuaC3I/Llama-3.1-8B-UltraMedical against the base model meta-llama/Llama-3.1-8B, then sanitized for vLLM
Downloads · 30 days
4
5% of all-time downloads
All-time downloads
74
Public
Repo size
3.4 GB
Likes
0
Public
Click a slice to open those files.
.safetensors671 MB · 100%
From the Hugging Face model README
Rank-128 LoRA adapter for the medical domain, extracted with mergekit from TsinghuaC3I/Llama-3.1-8B-UltraMedical against the base model meta-llama/Llama-3.1-8B, then sanitized for vLLM serving.
The raw mergekit extraction included full-rank modules_to_save tensors
(embed_tokens, lm_head, and RMSNorm layers) that vLLM's LoRA runtime does
not support. This upload contains only the pure low-rank lora_A/lora_B
weights (224 pairs: 32 layers x q/k/v/o/gate/up/down projections, bf16), with
modules_to_save: null in adapter_config.json. No resize_token_embeddings()
call is needed to load this adapter.
python -m vllm.entrypoints.openai.api_server \
--model meta-llama/Llama-3.1-8B \
--enable-lora \
--lora-modules medical=anjohn0077/NEXS-medical-lora \
--port 8000 \
--max-lora-rank 128 \
--gpu-memory-utilization 0.85
| Variant | Accuracy |
|---|---|
| Base model | 0.7169 |
| This LoRA on base (via vLLM) | 0.7059 |
| Original full fine-tune | 0.7721 |
Evaluated with lm-evaluation-harness against a local vLLM OpenAI-compatible endpoint:
lm_eval --model local-completions \
--model_args model=medical,base_url=http://localhost:8000/v1/completions,tokenizer=meta-llama/Llama-3.1-8B,num_concurrent=10 \
--tasks mmlu_professional_medicine \
--output_path results/vllm_medical