Instructions to use QinEmPeRoR93/Agentic-TimesFM-AKI with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use QinEmPeRoR93/Agentic-TimesFM-AKI with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="QinEmPeRoR93/Agentic-TimesFM-AKI") messages = [ { "role": "user", "content": [ {"type": "image", "url": "https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/p-blog/candy.JPG"}, {"type": "text", "text": "What animal is on the candy?"} ] }, ] pipe(text=messages)# Load model directly from transformers import AutoProcessor, AutoModelForMultimodalLM processor = AutoProcessor.from_pretrained("QinEmPeRoR93/Agentic-TimesFM-AKI") model = AutoModelForMultimodalLM.from_pretrained("QinEmPeRoR93/Agentic-TimesFM-AKI", device_map="auto") messages = [ { "role": "user", "content": [ {"type": "image", "url": "https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/p-blog/candy.JPG"}, {"type": "text", "text": "What animal is on the candy?"} ] }, ] inputs = processor.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=40) print(processor.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - TimesFM
How to use QinEmPeRoR93/Agentic-TimesFM-AKI with TimesFM:
# No code snippets available yet for this library. # To use this model, check the repository files and the library's documentation. # Want to help? PRs adding snippets are welcome at: # https://github.com/huggingface/huggingface.js
- Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- llama.cpp
How to use QinEmPeRoR93/Agentic-TimesFM-AKI with llama.cpp:
Install (macOS, Linux)
curl -LsSf https://llama.app/install.sh | sh # Start a local OpenAI-compatible server with a web UI: llama serve -hf QinEmPeRoR93/Agentic-TimesFM-AKI:Q6_K # Run inference directly in the terminal: llama cli -hf QinEmPeRoR93/Agentic-TimesFM-AKI:Q6_K
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama serve -hf QinEmPeRoR93/Agentic-TimesFM-AKI:Q6_K # Run inference directly in the terminal: llama cli -hf QinEmPeRoR93/Agentic-TimesFM-AKI:Q6_K
Use pre-built binary
# Download pre-built binary from: # https://github.com/ggerganov/llama.cpp/releases # Start a local OpenAI-compatible server with a web UI: ./llama-server -hf QinEmPeRoR93/Agentic-TimesFM-AKI:Q6_K # Run inference directly in the terminal: ./llama-cli -hf QinEmPeRoR93/Agentic-TimesFM-AKI:Q6_K
Build from source code
git clone https://github.com/ggerganov/llama.cpp.git cd llama.cpp cmake -B build cmake --build build -j --target llama-server llama-cli # Start a local OpenAI-compatible server with a web UI: ./build/bin/llama-server -hf QinEmPeRoR93/Agentic-TimesFM-AKI:Q6_K # Run inference directly in the terminal: ./build/bin/llama-cli -hf QinEmPeRoR93/Agentic-TimesFM-AKI:Q6_K
Use Docker
docker model run hf.co/QinEmPeRoR93/Agentic-TimesFM-AKI:Q6_K
- LM Studio
- Jan
- vLLM
How to use QinEmPeRoR93/Agentic-TimesFM-AKI with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "QinEmPeRoR93/Agentic-TimesFM-AKI" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "QinEmPeRoR93/Agentic-TimesFM-AKI", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/QinEmPeRoR93/Agentic-TimesFM-AKI:Q6_K
- SGLang
How to use QinEmPeRoR93/Agentic-TimesFM-AKI 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 "QinEmPeRoR93/Agentic-TimesFM-AKI" \ --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": "QinEmPeRoR93/Agentic-TimesFM-AKI", "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 "QinEmPeRoR93/Agentic-TimesFM-AKI" \ --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": "QinEmPeRoR93/Agentic-TimesFM-AKI", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Ollama
How to use QinEmPeRoR93/Agentic-TimesFM-AKI with Ollama:
ollama run hf.co/QinEmPeRoR93/Agentic-TimesFM-AKI:Q6_K
- Unsloth Studio
How to use QinEmPeRoR93/Agentic-TimesFM-AKI with Unsloth Studio:
Install Unsloth Studio (macOS, Linux, WSL)
curl -fsSL https://unsloth.ai/install.sh | sh # Run unsloth studio unsloth studio -H 0.0.0.0 -p 8888 # Then open http://localhost:8888 in your browser # Search for QinEmPeRoR93/Agentic-TimesFM-AKI to start chatting
Install Unsloth Studio (Windows)
irm https://unsloth.ai/install.ps1 | iex # Run unsloth studio unsloth studio -H 0.0.0.0 -p 8888 # Then open http://localhost:8888 in your browser # Search for QinEmPeRoR93/Agentic-TimesFM-AKI to start chatting
Using HuggingFace Spaces for Unsloth
# No setup required # Open https://huggingface.co/spaces/unsloth/studio in your browser # Search for QinEmPeRoR93/Agentic-TimesFM-AKI to start chatting
- Pi
How to use QinEmPeRoR93/Agentic-TimesFM-AKI with Pi:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf QinEmPeRoR93/Agentic-TimesFM-AKI:Q6_K
Configure the model in Pi
# Install Pi: npm install -g @mariozechner/pi-coding-agent # Add to ~/.pi/agent/models.json: { "providers": { "llama-cpp": { "baseUrl": "http://localhost:8080/v1", "api": "openai-completions", "apiKey": "none", "models": [ { "id": "QinEmPeRoR93/Agentic-TimesFM-AKI:Q6_K" } ] } } }Run Pi
# Start Pi in your project directory: pi
- Hermes Agent new
How to use QinEmPeRoR93/Agentic-TimesFM-AKI with Hermes Agent:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf QinEmPeRoR93/Agentic-TimesFM-AKI:Q6_K
Configure Hermes
# Install Hermes: curl -fsSL https://hermes-agent.nousresearch.com/install.sh | bash hermes setup # Point Hermes at the local server: hermes config set model.provider custom hermes config set model.base_url http://127.0.0.1:8080/v1 hermes config set model.default QinEmPeRoR93/Agentic-TimesFM-AKI:Q6_K
Run Hermes
hermes
- Atomic Chat new
- OpenClaw new
How to use QinEmPeRoR93/Agentic-TimesFM-AKI with OpenClaw:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf QinEmPeRoR93/Agentic-TimesFM-AKI:Q6_K
Configure OpenClaw
# Install OpenClaw: npm install -g openclaw@latest # Register the local server and set it as the default model: openclaw onboard --non-interactive --mode local \ --auth-choice custom-api-key \ --custom-base-url http://127.0.0.1:8080/v1 \ --custom-model-id "QinEmPeRoR93/Agentic-TimesFM-AKI:Q6_K" \ --custom-provider-id llama-cpp \ --custom-compatibility openai \ --custom-text-input \ --accept-risk \ --skip-health
Run OpenClaw
openclaw agent --local --agent main --message "Hello from Hugging Face"
- Docker Model Runner
How to use QinEmPeRoR93/Agentic-TimesFM-AKI with Docker Model Runner:
docker model run hf.co/QinEmPeRoR93/Agentic-TimesFM-AKI:Q6_K
- Lemonade
How to use QinEmPeRoR93/Agentic-TimesFM-AKI with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull QinEmPeRoR93/Agentic-TimesFM-AKI:Q6_K
Run and chat with the model
lemonade run user.Agentic-TimesFM-AKI-Q6_K
List all available models
lemonade list
Agentic-TimesFM-AKI
A Dual LLM–Time Series Framework for Predicting Drug-Induced Acute Kidney Injury with Privacy-Preserving Synthetic Data
📌 Model Overview
Agentic-TimesFM-AKI is a specialized, privacy-preserving multi-modal clinical framework designed for the continuous prediction of synergistic nephrotoxicity — specifically Acute Kidney Injury (AKI) induced by the concurrent administration of Vancomycin and Piperacillin-Tazobactam (Zosyn).
This repository hosts pre-trained weights, adapters, and quantized GGUF variants for the dual-model system, integrating:
- Gemma-4 12B Sentinel (QLoRA fine-tuned on synthetic clinical narratives).
- TimesFM 2.5 Agent (LoRA fine-tuned zero-shot time-series forecaster).
🏗️ Architecture & Functionality
The system leverages a dual-agent orchestration framework:
- TimesFM 2.5 Forecast Engine: Ingests longitudinal lab values (e.g., serum creatinine, BUN) and projects future 72-hour creatinine trajectories.
- Gemma-4 12B Clinical Sentinel: Receives TimesFM's 72-hour projections alongside patient demographics and medication timelines to output a structured binary prediction (
AKI_POSITIVE/AKI_NEGATIVE) and a natural language clinical warning.
Patient EHR / Labs ──▶ TimesFM 2.5 Agent (72h Forecast)
│
▼
Patient Context ──────▶ Gemma-4 12B Sentinel ──▶ Binary Risk + Clinical Warning
📊 Evaluation & Metrics
The framework was trained exclusively on differentially private synthetic data ($\varepsilon = 10$) to preserve patient privacy and validated on a real-world eICU holdout cohort (N=200):
| Metric | Point Estimate | 95% Bootstrap Confidence Interval |
|---|---|---|
| Accuracy | 0.970 | 0.945 – 0.990 |
| Sensitivity (Recall) | 0.944 | 0.892 – 0.988 |
| Specificity | 0.991 | 0.971 – 1.000 |
| Precision | 0.988 | 0.961 – 1.000 |
| F1-Score | 0.966 | 0.934 – 0.989 |
Performance Comparison vs. Baselines (eICU Holdout)
- Agentic-TimesFM-AKI (F1: 0.966) significantly outperformed traditional baselines:
- Random Forest (F1: 0.752, $p < 0.001$)
- XGBoost (F1: 0.748, $p < 0.001$)
- Logistic Regression (F1: 0.700, $p < 0.001$)
⚠️ Important Considerations & Limitations
- Formatting Fragility (Domain Shift): External validation on the MIMIC-IV demo cohort revealed performance degradation ($F1 = 0.421$) due to structural schema shifts. Prompt recalibration and strict schema harmonization are required before multi-center deployment.
- Generation Token Allocations: Truncating generation tokens (e.g.,
< 100tokens) prematurely cuts off the clinical reasoning chain, causing false negatives. Dynamic or high token limits ($\ge 250$ tokens) are recommended. - Clinical Scope: Currently optimized specifically for Vancomycin + Piperacillin-Tazobactam synergistic risk assessment.
💻 Quick Start & Usage
from transformers import AutoModelForCausalLM, AutoTokenizer
import torch
model_id = "QinEmPeRoR93/Agentic-TimesFM-AKI"
tokenizer = AutoTokenizer.from_pretrained(model_id)
model = AutoModelForCausalLM.from_pretrained(
model_id,
torch_dtype=torch.bfloat16,
device_map="auto"
)
prompt = """<|turn>user
Patient: 68yo male, MAP: 75 mmHg, Vancomycin Trough: 18 mg/L, Piperacillin-Tazobactam: Active.
TimesFM 72h Serum Creatinine Projection: [1.2, 1.4, 1.9 mg/dL]
Assess synergistic nephrotoxicity risk.
<|turn>model
"""
inputs = tokenizer(prompt, return_tensors="pt").to("cuda")
outputs = model.generate(**inputs, max_new_tokens=250)
print(tokenizer.decode(outputs[0], skip_special_tokens=True))
⚖️ Licensing & Terms
- Code & Model Weights: Released under the Apache 2.0 License.
- Base Model License: Fine-tuned from Google's Gemma 4. Usage must conform with Google Gemma Terms of Use.
📄 Citation
If you use this model or code in your work, please cite the corresponding paper:
@article{saka2026agentictimesfmaki,
title = {Agentic-TimesFM-AKI: A Dual LLM–Time Series Framework for Predicting Drug-Induced Acute Kidney Injury with Privacy-Preserving Synthetic Data},
author = {Alsakkaf, Gamal E.},
year = {2026},
note = {Manuscript under review}
}
- Downloads last month
- 11