Instructions to use h3ir/morbid0.0.2 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use h3ir/morbid0.0.2 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="h3ir/morbid0.0.2")# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("h3ir/morbid0.0.2") model = AutoModelForCausalLM.from_pretrained("h3ir/morbid0.0.2") - Notebooks
- Google Colab
- Kaggle
- Local Apps
- vLLM
How to use h3ir/morbid0.0.2 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "h3ir/morbid0.0.2" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "h3ir/morbid0.0.2", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/h3ir/morbid0.0.2
- SGLang
How to use h3ir/morbid0.0.2 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 "h3ir/morbid0.0.2" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "h3ir/morbid0.0.2", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'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 "h3ir/morbid0.0.2" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "h3ir/morbid0.0.2", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use h3ir/morbid0.0.2 with Docker Model Runner:
docker model run hf.co/h3ir/morbid0.0.2
Morbid.AI v0.0.1 - Mortality Prediction Model
Model Description
Morbid.AI is a specialized language model fine-tuned for mortality analysis and actuarial predictions. Based on Llama-2-7b, it's trained on the World Mortality Dataset to provide insights on:
- Life expectancy calculations
- Mortality trends analysis
- Death probability estimations
- Actuarial assessments
- Country-specific mortality comparisons
Intended Use
This model is designed for:
- Actuarial analysis
- Healthcare research
- Mortality trend analysis
- Educational purposes
Note: This model should NOT be used for personal medical advice or life insurance underwriting decisions.
Training Data
Fine-tuned on:
- World Mortality Dataset (2015-2024)
- 34,537 training examples
- Countries: 200+ nations
- Mortality metrics from official statistics
Usage
from transformers import AutoTokenizer, AutoModelForCausalLM
tokenizer = AutoTokenizer.from_pretrained("h3ir/morbid0.0.1")
model = AutoModelForCausalLM.from_pretrained("h3ir/morbid0.0.1")
prompt = "What are the mortality trends for Japan in 2023?"
inputs = tokenizer(prompt, return_tensors="pt")
outputs = model.generate(**inputs, max_length=200)
response = tokenizer.decode(outputs[0], skip_special_tokens=True)
API Usage
curl https://api-inference.huggingface.co/models/h3ir/morbid0.0.1 \
-X POST \
-d '{"inputs": "What is the life expectancy in France?"}' \
-H "Authorization: Bearer YOUR_TOKEN"
Model Performance
- Training Loss: 0.42
- Validation Accuracy: 87%
- Specialization: Mortality & Actuarial Data
Limitations
- Data limited to 2015-2024
- Predictions are statistical estimates
- Should not replace professional actuarial advice
- May have biases from source data
Citation
@misc{morbidai2024,
author = {h3ir},
title = {Morbid.AI: Mortality Prediction Model},
year = {2024},
publisher = {HuggingFace},
url = {https://huggingface.co/h3ir/morbid0.0.1}
}
Contact
For questions: Visit morbid.ai
- Downloads last month
- -