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", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- 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
| [ | |
| { | |
| "instruction": "### Context:\nCountry: Montenegro\nYear: 2022\niso3c: MNE\ntime: 9\ntime_unit: weekly\ndeaths: 130.0\n\n### Question:\nWhat was the mortality situation in Montenegro for 2022?\n\n### Analysis:\n", | |
| "response": "In 2022, Montenegro reported:\n- iso3c: MNE\n- time: 9\n- time_unit: weekly\n- deaths: 130.0", | |
| "country": "Montenegro", | |
| "year": 2022, | |
| "type": "year_specific" | |
| }, | |
| { | |
| "instruction": "### Context:\nCountry: Portugal\nYear: 2016\niso3c: PRT\ntime: 23\ntime_unit: weekly\ndeaths: 1906.0\n\n### Question:\nWhat was the mortality situation in Portugal for 2016?\n\n### Analysis:\n", | |
| "response": "In 2016, Portugal reported:\n- iso3c: PRT\n- time: 23\n- time_unit: weekly\n- deaths: 1906.0", | |
| "country": "Portugal", | |
| "year": 2016, | |
| "type": "year_specific" | |
| }, | |
| { | |
| "instruction": "### Context:\nCountry: Greece\nYear: 2023\niso3c: GRC\ntime: 32\ntime_unit: weekly\ndeaths: 2126.0\n\n### Question:\nWhat was the mortality situation in Greece for 2023?\n\n### Analysis:\n", | |
| "response": "In 2023, Greece reported:\n- iso3c: GRC\n- time: 32\n- time_unit: weekly\n- deaths: 2126.0", | |
| "country": "Greece", | |
| "year": 2023, | |
| "type": "year_specific" | |
| }, | |
| { | |
| "instruction": "### Historical Data:\nCountry: Oman\nRecent 5 years data:\n year\n24427 2024\n24428 2024\n24429 2024\n24430 2024\n24431 2024\n\n### Prediction Request:\nBased on the trend, what might be the mortality outlook for Oman in the next year?\n\n### Prediction:\n", | |
| "response": "Based on available data for Oman, continued monitoring of mortality trends is recommended.", | |
| "country": "Oman", | |
| "type": "prediction" | |
| }, | |
| { | |
| "instruction": "### Context:\nCountry: Lithuania\nYear: 2022\niso3c: LTU\ntime: 16\ntime_unit: weekly\ndeaths: 884.0\n\n### Question:\nWhat was the mortality situation in Lithuania for 2022?\n\n### Analysis:\n", | |
| "response": "In 2022, Lithuania reported:\n- iso3c: LTU\n- time: 16\n- time_unit: weekly\n- deaths: 884.0", | |
| "country": "Lithuania", | |
| "year": 2022, | |
| "type": "year_specific" | |
| } | |
| ] |