YAML Metadata
Warning:
empty or missing yaml metadata in repo card
(https://huggingface.co/docs/hub/model-cards#model-card-metadata)
DiseaseLLM PyTorch Checkpoint
This folder contains the PyTorch checkpoint (disease_llm_final.pth) and instructions for loading the DiseaseLLM model using your custom class.
Files
disease_llm_final.pth: Model weights and training metadatamodel_class.py: Custom model class (see below)
Usage
import torch
from main import DiseaseLLM, ModelConfig
def load_trained_model(checkpoint_path, config):
model = DiseaseLLM(config)
checkpoint = torch.load(checkpoint_path, map_location='cpu')
model.load_state_dict(checkpoint['model_state_dict'])
return model
config = ModelConfig()
config.vocab_size = 50257 # or your training vocab size
model = load_trained_model('disease_llm_final.pth', config)
model.eval()
Notes
- You must have the
DiseaseLLMandModelConfigclasses available (see yourmain.py). - This model is not directly compatible with Hugging Face's
AutoModelForCausalLM. - For Q&A inference, use your own generation code as in your training script.
Inference Providers
NEW
This model isn't deployed by any Inference Provider.
🙋
Ask for provider support