Views
No views yet
⚠️ Medical safety
This model is not a clinician. It can hallucinate and should not be used for diagnosis or treatment. Always involve qualified medical professionals.
arcee-ai/AFM-4.5B – Arcee’s 4.5B instruction model intended for cloud-to-edge deployment.merge_method: arcee_fusion.Author-run with the EleutherAIlm-evaluation-harness; seeds, prompts, and templates affect absolute scores.
| Benchmark | AFM-4.5B-OpenMed | AFM-4.5B (same harness) |
|---|---|---|
| MMLU | 61.10 | 55.53 |
| MMLU-Pro | 33.44 | 32.61 |
| IFEVAL | 63.55 | 63.67 |
| mmlu | AFM-4.5B-OpenMed | AFM-4.5B |
|---|---|---|
| other | ||
| clinical_knowledge | 67.55 | 65.66 |
| college_medicine | 64.74 | 54.34 |
| professional_medicine | 63.97 | 59.56 |
| virology | 49.4 | 48.19 |
| stem | ||
| anatomy | 62.96 | 56.3 |
| college_biology | 78.47 | 65.97 |
| college_chemistry | 44.00 | 37.00 |
| high_school_biology | 79.03 | 71.29 |
| high_school_chemistry | 53.2 | 43.84 |
| groups | ||
| humanities | 56.13 | 50.46 |
| other | 68.97 | 63.47 |
| social sciences | 73.25 | 68.61 |
| stem | 48.91 | 42.53 |
1# MMLU classic
2lm_eval --model hf \
3 --model_args pretrained=openmed-community/AFM-4.5B-OpenMed,parallelize=True,dtype=bfloat16,trust_remote_code=True \
4 --task mmlu \
5 --batch_size=64 \
6 --apply_chat_template \
7 --output_path=results \
8 --fewshot_as_multiturn
9
10
11# MMLU-Pro (10-choice)
12lm_eval --model hf \
13 --model_args pretrained=openmed-community/AFM-4.5B-OpenMed,parallelize=True,dtype=bfloat16,trust_remote_code=True \
14 --tasks leaderboard_mmlu_pro \
15 --batch_size=64 \
16 --apply_chat_template \
17 --output_path=results \
18 --fewshot_as_multiturn
19
20# IFEVAL (verifiable instruction following)
21lm_eval --model hf \
22 --model_args pretrained=openmed-community/AFM-4.5B-OpenMed,parallelize=True,dtype=bfloat16,trust_remote_code=True \
23 --tasks leaderboard_ifeval \
24 --batch_size=64 \
25 --apply_chat_template \
26 --output_path=results \
27 --fewshot_as_multiturn
281from transformers import AutoTokenizer, AutoModelForCausalLM
2import torch
3
4model_id = "openmed-community/AFM-4.5B-OpenMed"
5tok = AutoTokenizer.from_pretrained(model_id, use_fast=True)
6model = AutoModelForCausalLM.from_pretrained(model_id, torch_dtype=torch.bfloat16, device_map="auto")
7
8messages = [
9 {"role": "system", "content": "You are a careful medical assistant. Cite sources and warn this is not medical advice."},
10 {"role": "user", "content": "Briefly: cellulitis vs erysipelas differences?"}
11]
12prompt = tok.apply_chat_template(messages, add_generation_prompt=True, tokenize=False)
13inputs = tok(prompt, return_tensors="pt").to(model.device)
14out = model.generate(**inputs, max_new_tokens=256, do_sample=False)
15print(tok.decode(out[0], skip_special_tokens=True))