Text Generation
Transformers
Safetensors
English
Hindi
qwen2
medical
healthcare
clinical-reasoning
aiims
neet-pg
usmle
pubmedqa
india
sovereign-ai
axonmed
conversational
Eval Results (legacy)
text-generation-inference
Run this model with HF Jobs
Run Saathimed/AxonMed-7B on Hugging Face's managed compute, monitor its progress, and retrieve the results when it's done.
Paste one of these prompts into your coding agent:
Fine-tune on my dataset
Use HF Jobs and TRL to fine-tune https://huggingface.co/Saathimed/AxonMed-7B. Ask me which dataset to train on, then push the fine-tuned model to a new model repo. Run `hf jobs --help` first to learn the CLI.
Run batch inference
Use HF Jobs to run batch inference with https://huggingface.co/Saathimed/AxonMed-7B on the inputs in a mounted HF Bucket. Ask me which Bucket to use, then write the outputs back to it and keep each input ID. Run `hf jobs --help` first to learn the CLI.
Evaluate on a benchmark
Use HF Jobs to evaluate https://huggingface.co/Saathimed/AxonMed-7B. Ask me which benchmark to run, then save the scores and the per-example results to a new dataset repo. Run `hf jobs --help` first to learn the CLI.
Quantize for lower memory use
Use HF Jobs to create a 4-bit version of https://huggingface.co/Saathimed/AxonMed-7B. Push it to a new model repo, then reload it from there and report its memory footprint. Run `hf jobs --help` first to learn the CLI.
Instructions to use Saathimed/AxonMed-7B with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Saathimed/AxonMed-7B with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="Saathimed/AxonMed-7B") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("Saathimed/AxonMed-7B") model = AutoModelForCausalLM.from_pretrained("Saathimed/AxonMed-7B", device_map="auto") messages = [ {"role": "user", "content": "Who are you?"}, ] inputs = tokenizer.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=256) print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use Saathimed/AxonMed-7B with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "Saathimed/AxonMed-7B" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Saathimed/AxonMed-7B", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/Saathimed/AxonMed-7B
- SGLang
How to use Saathimed/AxonMed-7B 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 "Saathimed/AxonMed-7B" \ --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": "Saathimed/AxonMed-7B", "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 "Saathimed/AxonMed-7B" \ --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": "Saathimed/AxonMed-7B", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use Saathimed/AxonMed-7B with Docker Model Runner:
docker model run hf.co/Saathimed/AxonMed-7B
Publish certified lm-eval benchmark results (USMLE 64.10%, MedMCQA 61.15%, PubMedQA 75.80%)
Browse files123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291{ "results": { "medmcqa": { "name": "medmcqa", "alias": "medmcqa", "sample_len": 4183, "acc,none": 0.6115228305044227, "acc_stderr,none": 0.007536974985760747, "acc_norm,none": 0.6115228305044227, "acc_norm_stderr,none": 0.007536974985760747 }, "pubmedqa": { "name": "pubmedqa", "alias": "pubmedqa", "sample_len": 500, "acc,none": 0.758, "acc_stderr,none": 0.019173085678337164 }, "medqa_4options": { "name": "medqa_4options", "alias": "medqa_4options", "sample_len": 1273, "acc,none": 0.6410054988216811, "acc_stderr,none": 0.01345027674138528, "acc_norm,none": 0.6410054988216811, "acc_norm_stderr,none": 0.01345027674138528 } }, "group_subtasks": {}, "configs": { "medmcqa": { "task": "medmcqa", "dataset_path": "openlifescienceai/medmcqa", "training_split": "train", "validation_split": "validation", "test_split": "validation", "doc_to_text": "def doc_to_text(doc) -> str:\n \"\"\"\n Question: <question>\n Choices:\n A. <choice1>\n B. <choice2>\n C. <choice3>\n D. <choice4>\n Answer:\n \"\"\"\n choices = [doc[\"opa\"], doc[\"opb\"], doc[\"opc\"], doc[\"opd\"]]\n option_choices = {\n \"A\": choices[0],\n \"B\": choices[1],\n \"C\": choices[2],\n \"D\": choices[3],\n }\n\n prompt = \"Question: \" + doc[\"question\"] + \"\\nChoices:\\n\"\n for choice, option in option_choices.items():\n prompt += f\"{choice.upper()}. {option}\\n\"\n prompt += \"Answer:\"\n return prompt\n", "doc_to_target": "cop", "unsafe_code": false, "doc_to_choice": [ "A", "B", "C", "D" ], "description": "", "target_delimiter": " ", "fewshot_delimiter": "\n\n", "fewshot_config": { "sampler": "default", "split": null, "process_docs": null, "fewshot_indices": null, "samples": null, "doc_to_text": "<function doc_to_text at 0x7e7fea9a7ba0>", "doc_to_choice": [ "A", "B", "C", "D" ], "doc_to_target": "cop", "gen_prefix": null, "fewshot_delimiter": "\n\n", "target_delimiter": " " }, "num_fewshot": 0, "metric_list": [ { "metric": "acc", "aggregation": "mean", "higher_is_better": true }, { "metric": "acc_norm", "aggregation": "mean", "higher_is_better": true } ], "output_type": "multiple_choice", "repeats": 1, "should_decontaminate": true, "doc_to_decontamination_query": "{{question}}", "metadata": { "pretrained": "Saathimed/AxonMed-7B", "dtype": "bfloat16", "config_source": "/usr/local/lib/python3.12/dist-packages/lm_eval/tasks/medmcqa/medmcqa.yaml" } }, "medqa_4options": { "task": "medqa_4options", "dataset_path": "GBaker/MedQA-USMLE-4-options-hf", "training_split": "train", "validation_split": "validation", "test_split": "test", "doc_to_text": "def doc_to_text(doc) -> str:\n option_choices = {\n \"A\": doc[\"ending0\"],\n \"B\": doc[\"ending1\"],\n \"C\": doc[\"ending2\"],\n \"D\": doc[\"ending3\"],\n }\n answers = \"\".join((f\"{k}. {v}\\n\") for k, v in option_choices.items())\n return f\"Question: {doc['sent1']}\\n{answers}Answer:\"\n", "doc_to_target": "def doc_to_target(doc) -> int:\n return doc[\"label\"]\n", "unsafe_code": false, "doc_to_choice": [ "A", "B", "C", "D" ], "description": "", "target_delimiter": " ", "fewshot_delimiter": "\n\n", "fewshot_config": { "sampler": "default", "split": null, "process_docs": null, "fewshot_indices": null, "samples": null, "doc_to_text": "<function doc_to_text at 0x7e7ed611c220>", "doc_to_choice": [ "A", "B", "C", "D" ], "doc_to_target": "<function doc_to_target at 0x7e7ed611c2c0>", "gen_prefix": null, "fewshot_delimiter": "\n\n", "target_delimiter": " " }, "num_fewshot": 0, "metric_list": [ { "metric": "acc", "aggregation": "mean", "higher_is_better": true }, { "metric": "acc_norm", "aggregation": "mean", "higher_is_better": true } ], "output_type": "multiple_choice", "repeats": 1, "should_decontaminate": false, "metadata": { "pretrained": "Saathimed/AxonMed-7B", "dtype": "bfloat16", "config_source": "/usr/local/lib/python3.12/dist-packages/lm_eval/tasks/medqa/medqa.yaml" } }, "pubmedqa": { "task": "pubmedqa", "dataset_path": "bigbio/pubmed_qa", "dataset_name": "pubmed_qa_labeled_fold0_source", "training_split": "train", "validation_split": "validation", "test_split": "test", "doc_to_text": "def doc_to_text(doc) -> str:\n ctxs = \"\\n\".join(doc[\"CONTEXTS\"])\n return \"Abstract: {}\\nQuestion: {}\\nAnswer:\".format(\n ctxs,\n doc[\"QUESTION\"],\n )\n", "doc_to_target": "final_decision", "unsafe_code": false, "doc_to_choice": [ "yes", "no", "maybe" ], "description": "", "target_delimiter": " ", "fewshot_delimiter": "\n\n", "fewshot_config": { "sampler": "default", "split": null, "process_docs": null, "fewshot_indices": null, "samples": null, "doc_to_text": "<function doc_to_text at 0x7e7ed6609620>", "doc_to_choice": [ "yes", "no", "maybe" ], "doc_to_target": "final_decision", "gen_prefix": null, "fewshot_delimiter": "\n\n", "target_delimiter": " " }, "num_fewshot": 0, "metric_list": [ { "metric": "acc", "aggregation": "mean", "higher_is_better": true } ], "output_type": "multiple_choice", "repeats": 1, "should_decontaminate": false, "metadata": { "version": 1.0, "pretrained": "Saathimed/AxonMed-7B", "dtype": "bfloat16", "config_source": "/usr/local/lib/python3.12/dist-packages/lm_eval/tasks/pubmedqa/pubmedqa.yaml" } } }, "versions": { "medmcqa": "Yaml", "medqa_4options": "Yaml", "pubmedqa": 1.0 }, "n-shot": { "medmcqa": 0, "medqa_4options": 0, "pubmedqa": 0 }, "higher_is_better": { "medmcqa": { "acc": true, "acc_norm": true }, "medqa_4options": { "acc": true, "acc_norm": true }, "pubmedqa": { "acc": true } }, "n-samples": { "medmcqa": { "original": 4183, "effective": 4183 }, "pubmedqa": { "original": 500, "effective": 500 }, "medqa_4options": { "original": 1273, "effective": 1273 } }, "config": { "model": "hf", "model_args": { "pretrained": "Saathimed/AxonMed-7B", "dtype": "bfloat16" }, "model_num_parameters": 7615616512, "model_dtype": "torch.bfloat16", "model_revision": "main", "model_sha": "afa56930fb05bd782989a6061707eaedaafb1d7e", "batch_size": "4", "batch_sizes": [], "device": "cuda:0", "use_cache": null, "limit": null, "bootstrap_iters": 100000, "gen_kwargs": {}, "random_seed": 0, "numpy_seed": 1234, "torch_seed": 1234, "fewshot_seed": 1234 }, "git_hash": null, "date": 1794527715.0379124, "pretty_env_info": "PyTorch version: 2.8.0+cu128\nIs debug build: False\nCUDA used to build PyTorch: 12.8\nROCM used to build PyTorch: N/A\n\nOS: Ubuntu 24.04.5 LTS (x86_64)\nGCC version: (Ubuntu 13.3.0-6ubuntu2~24.04.1) 13.3.0\nClang version: Could not collect\nCMake version: version 3.28.3\nLibc version: glibc-2.39\n\nPython version: 3.12.3 (main, Aug 31 2026, 10:18:26) [GCC 13.3.0] (64-bit runtime)\nPython platform: Linux-6.8.0-138-generic-x86_64-with-glibc2.39\nIs CUDA available: True\nCUDA runtime version: 12.8.93\nCUDA_MODULE_LOADING set to: LAZY\nGPU models and configuration: GPU 0: NVIDIA GeForce RTX 4090\nNvidia driver version: 595.91.07\ncuDNN version: Probably one of the following:\n/usr/lib/x86_64-linux-gnu/libcudnn.so.9.8.0\n/usr/lib/x86_64-linux-gnu/libcudnn_adv.so.9.8.0\n/usr/lib/x86_64-linux-gnu/libcudnn_cnn.so.9.8.0\n/usr/lib/x86_64-linux-gnu/libcudnn_engines_precompiled.so.9.8.0\n/usr/lib/x86_64-linux-gnu/libcudnn_engines_runtime_compiled.so.9.8.0\n/usr/lib/x86_64-linux-gnu/libcudnn_graph.so.9.8.0\n/usr/lib/x86_64-linux-gnu/libcudnn_heuristic.so.9.8.0\n/usr/lib/x86_64-linux-gnu/libcudnn_ops.so.9.8.0\nHIP runtime version: N/A\nMIOpen runtime version: N/A\nIs XNNPACK available: True\n\nCPU:\nArchitecture: x86_64\nCPU op-mode(s): 32-bit, 64-bit\nAddress sizes: 48 bits physical, 48 bits virtual\nByte Order: Little Endian\nCPU(s): 128\nOn-line CPU(s) list: 0-127\nVendor ID: AuthenticAMD\nModel name: AMD EPYC 7B13 64-Core Processor\nCPU family: 25\nModel: 1\nThread(s) per core: 2\nCore(s) per socket: 64\nSocket(s): 1\nStepping: 1\nFrequency boost: enabled\nCPU(s) scaling MHz: 50%\nCPU max MHz: 3541.3679\nCPU min MHz: 1500.0000\nBogoMIPS: 4499.76\nFlags: fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ht syscall nx mmxext fxsr_opt pdpe1gb rdtscp lm constant_tsc rep_good nopl nonstop_tsc cpuid extd_apicid aperfmperf rapl pni pclmulqdq monitor ssse3 fma cx16 pcid sse4_1 sse4_2 movbe popcnt aes xsave avx f16c rdrand lahf_lm cmp_legacy svm extapic cr8_legacy abm sse4a misalignsse 3dnowprefetch osvw ibs skinit wdt tce topoext perfctr_core perfctr_nb bpext perfctr_llc mwaitx cpb cat_l3 cdp_l3 hw_pstate ssbd mba ibrs ibpb stibp vmmcall fsgsbase bmi1 avx2 smep bmi2 erms invpcid cqm rdt_a rdseed adx smap clflushopt clwb sha_ni xsaveopt xsavec xgetbv1 xsaves cqm_llc cqm_occup_llc cqm_mbm_total cqm_mbm_local user_shstk clzero irperf xsaveerptr rdpru wbnoinvd amd_ppin brs arat npt lbrv svm_lock nrip_save tsc_scale vmcb_clean flushbyasid decodeassists pausefilter pfthreshold v_vmsave_vmload vgif v_spec_ctrl umip pku ospke vaes vpclmulqdq rdpid overflow_recov succor smca fsrm debug_swap ibpb_exit_to_user\nVirtualization: AMD-V\nL1d cache: 2 MiB (64 instances)\nL1i cache: 2 MiB (64 instances)\nL2 cache: 32 MiB (64 instances)\nL3 cache: 256 MiB (8 instances)\nNUMA node(s): 1\nNUMA node0 CPU(s): 0-127\nVulnerability Gather data sampling: Not affected\nVulnerability Indirect target selection: Not affected\nVulnerability Itlb multihit: Not affected\nVulnerability L1tf: Not affected\nVulnerability Mds: Not affected\nVulnerability Meltdown: Not affected\nVulnerability Mmio stale data: Not affected\nVulnerability Reg file data sampling: Not affected\nVulnerability Retbleed: Not affected\nVulnerability Spec rstack overflow: Mitigation; Safe RET\nVulnerability Spec store bypass: Mitigation; Speculative Store Bypass disabled via prctl\nVulnerability Spectre v1: Mitigation; usercopy/swapgs barriers and __user pointer sanitization\nVulnerability Spectre v2: Mitigation; Retpolines; IBPB conditional; IBRS_FW; STIBP always-on; RSB filling; PBRSB-eIBRS Not affected; BHI Not affected\nVulnerability Srbds: Not affected\nVulnerability Tsa: Vulnerable: Clear CPU buffers attempted, no microcode\nVulnerability Tsx async abort: Not affected\nVulnerability Vmscape: Mitigation; IBPB before exit to userspace\n\nVersions of relevant libraries:\n[pip3] numpy==2.5.4\n[pip3] nvidia-cublas-cu12==12.8.4.1\n[pip3] nvidia-cuda-cupti-cu12==12.8.90\n[pip3] nvidia-cuda-nvrtc-cu12==12.8.93\n[pip3] nvidia-cuda-runtime-cu12==12.8.90\n[pip3] nvidia-cudnn-cu12==9.10.2.21\n[pip3] nvidia-cufft-cu12==11.3.3.83\n[pip3] nvidia-curand-cu12==10.3.9.90\n[pip3] nvidia-cusolver-cu12==11.7.3.90\n[pip3] nvidia-cusparse-cu12==12.5.8.93\n[pip3] nvidia-cusparselt-cu12==0.7.1\n[pip3] nvidia-cusparselt-cu13==0.8.1\n[pip3] nvidia-nccl-cu12==2.27.3\n[pip3] nvidia-nvjitlink-cu12==12.8.93\n[pip3] nvidia-nvtx-cu12==12.8.90\n[pip3] nvtx==0.2.15\n[pip3] tokenspeed-triton==3.9.10.post20261028\n[pip3] torch==2.8.0+cu128\n[pip3] torchcodec==0.17.0\n[pip3] torchvision==0.23.0+cu128\n[pip3] triton==3.4.0\n[conda] Could not collect", "transformers_version": "5.22.2", "lm_eval_version": "0.4.13", "upper_git_hash": null, "tokenizer_pad_token": [ "<|vision_pad|>", "151654" ], "tokenizer_eos_token": [ "<|im_end|>", "151645" ], "tokenizer_bos_token": [ null, "None" ], "eot_token_id": 151645, "max_length": 32768, "task_hashes": {}, "model_source": "hf", "model_name": "Saathimed/AxonMed-7B", "model_name_sanitized": "Saathimed__AxonMed-7B", "system_instruction": null, "system_instruction_sha": null, "fewshot_as_multiturn": null, "chat_template": null, "chat_template_sha": null, "total_evaluation_time_seconds": "126.16833270501229"}eval_results/results_official_lm_eval.jsonAdded+291