Tao Finetune Kumo Anomaly logo

Tao Finetune Kumo Anomaly

Organization
NVIDIA-TAO
tao-finetune-kumo-anomaly

Kumo-Anomaly — diffusion-based anomaly detection and fine-tuning for multivariate time series. Use when the user asks to "fine-tune Kumo-Anomaly", "run Kumo-Anomaly inference", "detect anomalies with diffusion", "time series anomaly detection", "finetune Kumo-Anomaly", "use perform_anomaly_analysis_with_diffusion", "automl Kumo-Anomaly", "hyperparameter search Kumo-Anomaly", "hyperparameter optimization" or mentions "curriculum_medium.yaml", "final_model.pth", "kumo-anomaly", "sdk/anomaly_analysis", or "TSDiffuser_Generic".

Overview

PublisherNVIDIA-TAO
Repositorytao-skill-bank
Skill nametao-finetune-kumo-anomaly
Stars
98
Forks
28
Bundled files
7
LicenseApache-2.0
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • 7 bundled files

    Scripts, templates, and references the model can read while it works. Files are read-only and never executed.

  • Open source

    Published by NVIDIA-TAO on GitHub. Read the source before you install it.

Installation

Install the Tao Finetune Kumo Anomaly AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
    https://github.com/NVIDIA-TAO/tao-skill-bank/tree/main/skills/models/tao-finetune-kumo-anomaly
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/NVIDIA-TAO/tao-skill-bank.git /tmp/tao-skill-bank
mkdir -p .claude/skills
cp -r /tmp/tao-skill-bank/skills/models/tao-finetune-kumo-anomaly .claude/skills/tao-finetune-kumo-anomaly
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Tao Finetune Kumo Anomaly in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads Tao Finetune Kumo Anomaly on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so Tao Finetune Kumo Anomaly is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

Kumo-Anomaly

Diffusion-based anomaly detection and fine-tuning for multivariate time series. The model reconstructs randomly masked segments and scores each timestep by MAE between reconstruction and original signal; adaptive thresholding (SCS or MACS) converts scores to binary labels.

Source code: https://github.com/NVIDIA/Kumo-TS Pretrained weights: https://huggingface.co/nvidia/Kumo-Anomaly

For the most up-to-date usage information, refer to the README files in the Kumo-TS repository:

External dependencies

DependencyPurposeInstall
Python 3.12+Runtimehttps://www.python.org/downloads/
uvPackage + environment managerpip install uv
CUDA toolkit (optional)GPU accelerationhttps://developer.nvidia.com/cuda-downloads
huggingface_hubWeight download from HFBundled via uv sync

Credentials

nvidia/Kumo-Anomaly is a public repo — no token required for downloading weights. If you ever hit a 401/403 (gated access or private fork) or a 504 on first download, see the Known pitfalls section.

Quick start

bash
git clone --branch main --single-branch https://github.com/NVIDIA/Kumo-TS Kumo-TS
cd Kumo-TS/Kumo-Anomaly
uv sync                              # install dependencies (one-time)

# Inference — synthetic data, auto-downloads weights from HF on first run
uv run python examples/quick_example.py

# Inference — your own CSV
uv run python examples/quick_example.py \
  --model-path final_model.pth \
  --config-path curriculum_medium.yaml \
  --dataset-path /path/to/data.csv

# Pre-download weights only (warm the cache before going offline)
uv run python examples/quick_example.py --download-weights

# Fine-tune on your own normal-behavior data
uv run python examples/finetune_example.py \
  --csv /path/to/normal_training_data.csv \
  --timestamp-col timestamp \
  --label-col is_anomaly \
  --epochs 20 \
  --output-dir artifacts/finetune_my_data

Inference

Use perform_anomaly_analysis_with_diffusion in sdk/anomaly_analysis.py. It validates input, auto-dispatches across all visible GPUs, applies adaptive thresholding (SCS or MACS), and returns the original DataFrame with Anomaly (0/1) and MAE columns appended.

python
import sys, pandas as pd
sys.path.append("/path/to/Kumo-TS/Kumo-Anomaly")  # clone Kumo-TS with --branch main
from sdk.anomaly_analysis import perform_anomaly_analysis_with_diffusion

df = pd.read_csv("your_data.csv")

# The API raises ValueError on non-numeric columns — drop timestamp, IDs, and labels first.
df = df.select_dtypes(include="number")

results = perform_anomaly_analysis_with_diffusion(
    df=df,
    threshold_strategy="scs",       # "scs" (fast) or "macs" (adaptive)
    model_path=None,                 # None → auto-download final_model.pth from HF
    model_config_path=None,          # None → auto-download curriculum_medium.yaml from HF
    nsample=15,                      # diffusion samples per window; ↑ accuracy, ↑ latency
    preprocess_model_dir=None,       # optional preprocessing model directory
)
# results columns: Anomaly (0/1), MAE (float), plus all original columns
print(results[["Anomaly", "MAE"]].describe())

Reporting (sdk_config)

perform_anomaly_analysis_with_diffusion takes an optional sdk_config keyword — an ADDiffusionConfig, a path to a YAML file, or None for defaults. It scopes report-generation knobs only; inference-behavior args (threshold_strategy, nsample, model_path, model_config_path) stay as direct function arguments.

python
from sdk.anomaly_analysis import ADDiffusionConfig, perform_anomaly_analysis_with_diffusion

results = perform_anomaly_analysis_with_diffusion(
    df=df,
    threshold_strategy="scs",
    sdk_config=ADDiffusionConfig(
        report_path="artifacts/anomaly_report.pdf",
        report_title="Anomaly Detection Report",
    ),
)

Or pass a YAML path instead of the dataclass — load_sdk_config accepts a flat mapping or one nested under a top-level sdk: key (so the file can carry other sections alongside it), and rejects unknown keys:

yaml
sdk:
  report_path: artifacts/anomaly_report.pdf
  report_title: Anomaly Detection Report
python
results = perform_anomaly_analysis_with_diffusion(
    df=df,
    threshold_strategy="scs",
    sdk_config="sdk_config.yaml",
)

ADDiffusionConfig fields: report_path (str/Path, default None — set to enable the PDF report), timestamp_column (str, None), ground_truth_column (str, None), report_title (str, "Kumo-Anomaly Report"), report_max_pages (int, 10).

Inference CLI reference

ArgumentDefaultDescription
--dataset-pathsyntheticCSV with numeric feature columns
--model-pathauto-downloadPath to .pth checkpoint
--config-pathauto-downloadPath to curriculum_medium.yaml
--download-weights—Fetch weights from HF and exit
--skip-downloadfalseRequire local weights; skip HF fetch

Fine-tuning

Fine-tune on your own data. The training CSV should contain mostly normal behavior. Validate the pretrained model on your domain before fine-tuning.

bash
uv run python examples/finetune_example.py \
  --csv /path/to/normal_data.csv \
  --val-csv /path/to/val_data.csv \   # optional; otherwise --val-ratio splits --csv
  --pretrained-model final_model.pth \
  --epochs 20 --batch-size 16 --lr 1e-5 \
  --output-dir artifacts/finetune_my_data

Fine-tuning arguments

ArgumentDefaultDescription
--run-config—JSON/YAML config file generated by AutoMLRunner ({config_path}). All fields below can be set here; explicit CLI flags override the file.
--csvrequiredTraining CSV (ideally containing normal behavior). Required if not supplied via --run-config.
--val-csv—Separate validation CSV
--val-ratio0.3Validation fraction when --val-csv not used (temporal split)
--timestamp-coltimestampColumn to drop from features
--label-col—Label column to drop
--drop-cols—Comma-separated extra columns to drop
--pretrained-modelfinal_model.pthWarm-start checkpoint (auto-downloaded if missing)
--configcurriculum_medium.yamlModel config YAML
--repo-idnvidia/Kumo-AnomalyHuggingFace repo for auto-download
--no-downloadfalseFail if pretrained weights are not local
--epochs10Training epochs
--batch-size16Per-GPU batch size
--lr1e-5AdamW learning rate
--weight-decay1e-6AdamW weight decay
--grad-clip1.0Gradient norm clip
--num-workers0DataLoader workers
--seed42Random seed
--output-dirartifacts/finetuneOutput directory
--window-lengthconfig (100)Sliding window length in timesteps
--window-stride1Step between consecutive windows
--splitconfig (10)Alternating mask segments per window
--mask-ratio0.7Fraction of each window masked during training
--scale-factorconfig (1)Scale multiplier after min-max normalization
--num-gpusall availableNumber of GPUs for DDP fine-tuning; set 1 to force single-GPU

Running inference with a fine-tuned checkpoint

python
results = perform_anomaly_analysis_with_diffusion(
    df=df,
    threshold_strategy="scs",
    model_path="artifacts/finetune_my_data/best_finetuned_model.pth",
    model_config_path="artifacts/finetune_my_data/finetune_config.yaml",
    nsample=15,
)

AutoML (HPO: hyperparameter optimization)

This skill supports AutoML for fine-tuning HPO and labeled inference HPO through tao-skill-bank:tao-run-automl with this model's skill_dir.

Read references/automl.md when the user asks for AutoML/HPO setup, tunable parameters, VirtualEnvSDK setup, config flow, window-length constraints, inference trial scripts, or AutoML result handoff details.

Data requirements

PropertyRequirement
Rows≥ window_length (default 100); ≥ target_dim (default 18) for PCA
ColumnsMust be numeric — the API raises ValueError on non-numeric columns; drop timestamp, IDs, and labels before calling
ValuesNo NaN / ±Inf — fill before passing to the API
Feature count > target_dimPCA reduction to target_dim; needs ≥ target_dim rows
Feature count < target_dimZero-padded to target_dim

target_dim 18 is the config-file default, not a hard constant — when fine-tuning warm-starts from a published checkpoint (--pretrained-model), the checkpoint's embedded config overrides it (the published final_model.pth was trained at target_dim=40). Check the checkpoint's config rather than assuming 18 when reasoning about PCA/padding behavior for warm-started fine-tuning.

timestamp,sensor_1,sensor_2,sensor_3
2024-01-01 00:00:00,0.42,1.10,-0.33
...

Pass only numeric feature columns to the inference API — it raises ValueError on non-numeric columns rather than dropping them. Use df.select_dtypes(include="number") or drop by name before calling. Fine-tuning handles this via --timestamp-col, --label-col, and --drop-cols CLI args.

Output structure

Inference (examples/quick_example.py):

examples/datasets/
└── kumo-anomaly-results.csv # original columns + Anomaly (0/1) + MAE

Fine-tuning (--output-dir artifacts/finetune_my_data):

artifacts/finetune_my_data/
├── best_finetuned_model.pth     # checkpoint with lowest validation loss
├── final_finetuned_model.pth    # checkpoint from last epoch
├── metrics.json                 # scalar for AutoML: {"val_loss": <best>}
├── epoch_metrics.json           # per-epoch log: [{"epoch": N, "train_loss": …, "val_loss": …}]
└── finetune_config.yaml         # config used during training (for reproducibility)

Model configuration (curriculum_medium.yaml)

FieldDefaultDescription
model.target_dim18Internal feature dim; data is PCA'd/padded to this
dataset.window_length100Sliding window size in timesteps
dataset.split10Alternating mask segments per window
dataset.scale_factor1Scale multiplier after min-max normalization
diffusion.num_steps500Full diffusion steps (overridden by DPM-Solver)
diffusion.channels128Model hidden dimension
diffusion.layers6Transformer encoder layers

Hardware

TierSetupNotes
Minimum1× CPUFunctional; DPM-Solver reduces steps 500 → 20
Recommended1× NVIDIA GPU (≥8 GB VRAM)Strongly recommended for fine-tuning
Multi-GPU inference2–8× NVIDIA GPUsauto-dispatched by perform_anomaly_analysis_with_diffusion
Multi-GPU fine-tuning2+× NVIDIA GPUsAuto DDP via --num-gpus (defaults to all visible GPUs)

Known pitfalls

SymptomCauseFix
HfHubHTTPError: 401Repo gated or token missingexport HUGGINGFACE_HUB_TOKEN="hf_..." or huggingface-cli login
504 / timeout on first weight downloadHF CDN throttles unauthenticated requests — public repos are still subject to this on first downloadSet export HUGGINGFACE_HUB_TOKEN="$HF_TOKEN" before running; authenticated requests use a more reliable CDN path
ValueError: No numeric columnsAll columns are strings/datesDrop non-numeric columns before calling API
ValueError: PCA needs at least target_dim rowsFewer rows than target_dim (18)Provide a longer time series
ValueError: Need at least N rows (finetune)Split shorter than window_lengthEnsure each train/val split has ≥ 100 rows
RuntimeError: CUDA out of memoryBatch too largeReduce --batch-size or nsample
All MAE scores identicalConstant-value columnsDrop zero-variance columns before calling API
ModuleNotFoundError: sdkWrong working directorycd Kumo-Anomaly/ before uv run, or add it to sys.path
Slow inference on CPUMany diffusion windowsReduce nsample to 5–10 for smoke tests

Bundled files

The model reads these on demand while the skill is loaded. They are exposed as readable files and are never executed.

Frequently asked questions

What does the Tao Finetune Kumo Anomaly AI skill do?

Kumo-Anomaly — diffusion-based anomaly detection and fine-tuning for multivariate time series. Use when the user asks to "fine-tune Kumo-Anomaly", "run Kumo-Anomaly inference", "detect anomalies with diffusion", "time series anomaly detection", "finetune Kumo-Anomaly", "use perform_anomaly_analysis_with_diffusion", "automl Kumo-Anomaly", "hyperparameter search Kumo-Anomaly", "hyperparameter optimization" or mentions "curriculum_medium.yaml", "final_model.pth", "kumo-anomaly", "sdk/anomaly_analysis", or "TSDiffuser_Generic".

Why use Tao Finetune Kumo Anomaly on TypingMind?

Because you install it once and use it with any model. Tao Finetune Kumo Anomaly is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install Tao Finetune Kumo Anomaly in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/NVIDIA-TAO/tao-skill-bank/tree/main/skills/models/tao-finetune-kumo-anomaly. TypingMind reads its SKILL.md and bundles its files and installs it as a skill you can enable per chat.

Which AI models can use Tao Finetune Kumo Anomaly?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with Tao Finetune Kumo Anomaly?

As many as you like. As long as a model supports skills, you can use Tao Finetune Kumo Anomaly with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the Tao Finetune Kumo Anomaly AI skill free?

Yes. It is published on GitHub by NVIDIA-TAO under the Apache-2.0 license. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇