Instructions to use Chakster/Tinyllama_HeartFailure with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- PEFT
How to use Chakster/Tinyllama_HeartFailure with PEFT:
from peft import PeftModel from transformers import AutoModelForCausalLM base_model = AutoModelForCausalLM.from_pretrained("TinyLlama/TinyLlama-1.1B-Chat-v1.0") model = PeftModel.from_pretrained(base_model, "Chakster/Tinyllama_HeartFailure") - Transformers
How to use Chakster/Tinyllama_HeartFailure with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="Chakster/Tinyllama_HeartFailure") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("Chakster/Tinyllama_HeartFailure", dtype="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps
- vLLM
How to use Chakster/Tinyllama_HeartFailure with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "Chakster/Tinyllama_HeartFailure" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Chakster/Tinyllama_HeartFailure", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/Chakster/Tinyllama_HeartFailure
- SGLang
How to use Chakster/Tinyllama_HeartFailure 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 "Chakster/Tinyllama_HeartFailure" \ --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": "Chakster/Tinyllama_HeartFailure", "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 "Chakster/Tinyllama_HeartFailure" \ --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": "Chakster/Tinyllama_HeartFailure", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use Chakster/Tinyllama_HeartFailure with Docker Model Runner:
docker model run hf.co/Chakster/Tinyllama_HeartFailure
Model Card: TinyLlama Heart Failure Optimized
Model Details
Model Name: TinyLlama Heart Failure
Model Type: Fine-tuned Language Model
Base Model: TinyLlama
Domain: Heart Failure Q&A
Version: 1.0
Date: July 13, 2025
Model Description
This model is a domain-specific fine-tuned version of TinyLlama, optimized for answering questions about heart failure. It has been trained to provide medically relevant information about heart failure symptoms, causes, treatments, and related cardiovascular concepts.
Intended Use
Primary Use Cases
- Educational Q&A about heart failure
- Medical information assistance for healthcare professionals
- Patient education support (under professional supervision)
Out-of-Scope Use Cases
- Clinical diagnosis or treatment decisions
- Emergency medical situations
- Replacement for professional medical advice
Performance Metrics
Core Language Metrics
- ROUGE-1: 0.3003
- ROUGE-2: 0.1253
- ROUGE-L: 0.2335
- BLEU: 0.0681
- Semantic Similarity: 0.4325
- Perplexity: 6.49
Domain-Specific Metrics
- Medical Term Usage: 100.0% (cardiac domain relevance)
- Response Completeness: 100.0% (proper sentence endings)
- Average Response Length: 45.1 words
- Repetition Score: 1.14 (lower is better)
Overall Performance Score: 0.182
Training Data
- Evaluation Samples: 20 heart failure Q&A pairs
- Domain Focus: Cardiovascular health, specifically heart failure
- Data Quality: Medically accurate reference answers
Model Architecture
- Tokenizer Vocab Size: 32,001
- Custom Tokens:
<|end|>token for response termination - Device: CPU optimized
- Generation Parameters:
- Temperature: 0.6
- Top-p: 0.9
- Max tokens: 80
- Downloads last month
- 3
Model tree for Chakster/Tinyllama_HeartFailure
Base model
TinyLlama/TinyLlama-1.1B-Chat-v1.0