Instructions to use Yale-BIDS-Chen/LEME-SFT-70B with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Yale-BIDS-Chen/LEME-SFT-70B with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="Yale-BIDS-Chen/LEME-SFT-70B") 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("Yale-BIDS-Chen/LEME-SFT-70B") model = AutoModelForCausalLM.from_pretrained("Yale-BIDS-Chen/LEME-SFT-70B", 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 Yale-BIDS-Chen/LEME-SFT-70B with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "Yale-BIDS-Chen/LEME-SFT-70B" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Yale-BIDS-Chen/LEME-SFT-70B", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/Yale-BIDS-Chen/LEME-SFT-70B
- SGLang
How to use Yale-BIDS-Chen/LEME-SFT-70B 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 "Yale-BIDS-Chen/LEME-SFT-70B" \ --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": "Yale-BIDS-Chen/LEME-SFT-70B", "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 "Yale-BIDS-Chen/LEME-SFT-70B" \ --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": "Yale-BIDS-Chen/LEME-SFT-70B", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use Yale-BIDS-Chen/LEME-SFT-70B with Docker Model Runner:
docker model run hf.co/Yale-BIDS-Chen/LEME-SFT-70B
Llama 3 LEME-SFT-70B
LEME-SFT-70B is an ophthalmology language model developed by the Yale BIDS Chen Lab through supervised fine-tuning of Meta-Llama-3-70B-Instruct.
Paper · Code · Training data
| Property | Value |
|---|---|
| Base model | Meta-Llama-3-70B-Instruct |
| Parameters | 70B |
| Training | Supervised fine-tuning (SFT) |
| Weights | BF16, safetensors |
Training data
The model was fine-tuned on ophthalmology instruction data covering open-ended and multiple-choice question answering, USMLE-style questions, clinical information extraction, and patient–clinician dialogue.
Training data: LEME-Training-Data (sft).
Usage
from transformers import AutoModelForCausalLM, AutoTokenizer
model_id = "Yale-BIDS-Chen/LEME-SFT-70B"
tokenizer = AutoTokenizer.from_pretrained(model_id)
model = AutoModelForCausalLM.from_pretrained(
model_id,
torch_dtype="auto",
device_map="auto",
)
messages = [{"role": "user", "content": "Explain the difference between dry and wet AMD."}]
inputs = tokenizer.apply_chat_template(
messages, add_generation_prompt=True, return_dict=True, return_tensors="pt"
).to(model.device)
outputs = model.generate(**inputs, max_new_tokens=512, do_sample=False)
print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:], skip_special_tokens=True))
Contact
For general inquiries, please contact Hyunjae Kim at hyunjae.kim@yale.edu.
License
LEME code, models, data, and other related materials may be used for non-commercial research purposes. Any derivative works must be made publicly available through a public platform, such as GitHub or Hugging Face. For commercial-use inquiries, please contact us (agreements@yale.edu or qingyu.chen@yale.edu). Please see the LICENSE file for the full terms.
Built with Meta Llama 3. The base model is also subject to the Meta Llama 3 Community License and Acceptable Use Policy.
Citation
@article{kim2026leme,
title={LEME: open large language models for ophthalmology with advanced reasoning and clinical validation},
author={Kim, Hyunjae and Ai, Xuguang and Srinivasan, Sahana and Gilson, Aidan and Singer, Maxwell B and Pushpanathan, Krithi and Xie, Qianqian and Park, Jungwoo and Applebaum, Serina and Yang, Gabriel Dawei and others},
journal={npj Digital Medicine},
year={2026},
publisher={Nature Publishing Group UK, London}
}
- Downloads last month
- 307