当前位置: 首页 > Skill >

Tandemn Tuna Skill

Tandemn Tuna Skill

Tandemn Tuna Skill

{ "answer": "在 GPU 上部署和提供 LLM 模型。比较 GPU 价格。在 Modal、RunPod、Cerebrium、Cloud Run、Baseten 或 Azure 上启动 vLLM,并支持 Spot 实例回退。" }

0.0.1 2026.11.20 429
获取Skill文件查看使用说明
作 者:顾澄 许可证: 更新时间:2026.11.20
本文目录展开

Tuna — Deploy and Serve LLM Models on GPU Infrastructure

Tuna is a hybrid GPU inference orchestrator. It lets you deploy, serve, and manage LLM models (Llama, Qwen, Mistral, DeepSeek, Gemma, and any HuggingFace model) on serverless GPUs from Modal, RunPod, Cerebrium, Google Cloud Run, Baseten, or Azure Container Apps, with optional spot instance fallback on AWS via SkyPilot. Every deployment gets an OpenAI-compatible /v1/chat/completions endpoint.

The key idea: serverless GPUs handle requests immediately (fast cold start, pay-per-second) while a cheaper spot GPU boots in the background. Once spot is ready, traffic shifts there. If spot gets preempted, traffic falls back to serverless automatically. This gives you 3–5x cost savings over pure serverless with zero downtime.

Quick Start — Deploy a Model in 3 Commands

# 1. Install tuna
uv pip install tandemn-tuna

# 2. Deploy a model (auto-picks cheapest serverless provider for the GPU)
tuna deploy --model Qwen/Qwen3-0.6B --gpu L4 --service-name my-llm

# 3. Query your endpoint (shown in deploy output)
curl http://<router-ip>:8080/v1/chat/completions 
  -H "Content-Type: application/json" 
  -d '{"model": "Qwen/Qwen3-0.6B", "messages": [{"role": "user", "content": "Hello!"}]}'

For serverless-only (no spot, no AWS needed):

tuna deploy --model Qwen/Qwen3-0.6B --gpu L4 --serverless-only

All Commands

tuna deploy — Launch a model on GPU

Deploy a model across serverless + spot infrastructure. This is the main command.

tuna deploy --model <HuggingFace-model-ID> --gpu <GPU> [options]

Required arguments:

  • --model — HuggingFace model ID (e.g., Qwen/Qwen3-0.6B, meta-llama/Llama-3-70b)
  • --gpu — GPU type (e.g., T4, L4, L40S, A100, H100, B200)

Common options:

  • --service-name — Name for the deployment (auto-generated if omitted)
  • --serverless-provider — Force a specific provider: modal, runpod, cloudrun, baseten, azure, cerebrium (default: cheapest available)
  • --serverless-only — Serverless only, no spot backend or router (no AWS needed)
  • --gpu-count — Number of GPUs (default: 1)
  • --tp-size — Tensor parallel size (default: 1)
  • --max-model-len — Max sequence length (default: 4096)
  • --spots-cloud — Cloud for spot GPUs: aws or azure (default: aws)
  • --region — Cloud region for spot instances
  • --concurrency — Override serverless concurrency limit
  • --no-scale-to-zero — Keep at least 1 spot replica running
  • --public — Make endpoint publicly accessible (no auth)
  • --scaling-policy — Path to YAML with scaling parameters

Provider-specific options:

  • --gcp-project, --gcp-region — For Cloud Run
  • --azure-subscription, --azure-resource-group, --azure-region, --azure-environment — For Azure

Examples:

# Deploy Llama 3 on Modal with hybrid spot
tuna deploy --model meta-llama/Llama-3-8b --gpu A100 --serverless-provider modal

# Deploy on RunPod, serverless-only
tuna deploy --model mistralai/Mistral-7B-Instruct-v0.3 --gpu L40S --serverless-provider runpod --serverless-only

# Deploy on Azure with an existing environment
tuna deploy --model Qwen/Qwen3-0.6B --gpu T4 --serverless-provider azure --azure-environment my-env

# Deploy a large model with tensor parallelism
tuna deploy --model meta-llama/Llama-3-70b --gpu H100 --gpu-count 4 --tp-size 4

tuna show-gpus — Compare GPU Prices Across Providers

Show GPU pricing from all serverless providers, optionally including spot prices.

tuna show-gpus [--gpu <GPU>] [--provider <provider>] [--spot]

Examples:

# Show all GPU prices across all providers
tuna show-gpus

# Show H100 pricing specifically
tuna show-gpus --gpu H100

# Show Modal's prices only
tuna show-gpus --provider modal

# Include AWS spot prices for comparison
tuna show-gpus --spot

tuna check — Validate Provider Setup (Preflight)

Run preflight checks to verify credentials, CLIs, and quotas for a provider before deploying.

tuna check --provider <provider> [--gpu <GPU>]

Examples:

# Check Modal setup
tuna check --provider modal

# Check Azure with specific GPU
tuna check --provider azure --gpu T4 --azure-subscription <id> --azure-resource-group <rg>

tuna status — Check Deployment Status

tuna status --service-name <name>

tuna cost — Show Cost Savings Dashboard

tuna cost --service-name <name>

tuna list — List All Deployments

tuna list [--status active|destroyed|failed]

tuna destroy — Tear Down a Deployment

# Destroy a specific deployment
tuna destroy --service-name <name>

# Destroy all deployments
tuna destroy --all

Provider Setup Guide

Each serverless provider needs its own credentials. Run tuna check --provider <name> to verify setup.

Modal

pip install modal  # or: uv pip install tandemn-tuna[modal]
modal token new    # opens browser to authenticate

No environment variables needed — token is stored in Modal's config.

RunPod

export RUNPOD_API_KEY="your-api-key"

Get your API key from the RunPod console.

Google Cloud Run

pip install google-cloud-run  # or: uv pip install tandemn-tuna[cloudrun]
gcloud auth login
gcloud auth application-default login

Optionally set GOOGLE_CLOUD_PROJECT and GOOGLE_CLOUD_REGION, or pass --gcp-project and --gcp-region.

Baseten

pip install truss  # or: uv pip install tandemn-tuna[baseten]
export BASETEN_API_KEY="your-api-key"
truss login --api-key $BASETEN_API_KEY

Azure Container Apps

pip install azure-mgmt-appcontainers azure-identity  # or: uv pip install tandemn-tuna[azure]
az login
az provider register --namespace Microsoft.App
az provider register --namespace Microsoft.OperationalInsights

Pass --azure-subscription, --azure-resource-group, and --azure-region on deploy, or set AZURE_SUBSCRIPTION_ID, AZURE_RESOURCE_GROUP, AZURE_REGION env vars. First deploy creates a GPU environment (~30 min); subsequent deploys reuse it (~2 min). Use --azure-environment to specify an existing environment.

Cerebrium

pip install cerebrium  # or: uv pip install tandemn-tuna[cerebrium]
cerebrium login
export CEREBRIUM_API_KEY="your-api-key"

Note: Hobby plan gives T4, A10, L4, L40S. A100 and H100 require Enterprise.

Spot GPUs (AWS via SkyPilot)

Spot is included automatically in hybrid deploys. Just configure AWS:

aws configure  # set access key, secret key, region

Use --serverless-only to skip spot if you don't have AWS set up.

Common Scenarios

When the user wants to deploy a model for quick testing: Use --serverless-only to skip spot setup. Pick a small GPU like L4 or T4. Example:

tuna deploy --model Qwen/Qwen3-0.6B --gpu L4 --serverless-only

When the user wants the cheapest deployment: First run tuna show-gpus --spot to compare serverless and spot prices. Then deploy with hybrid mode (the default) to get spot savings. The auto provider selector already picks the cheapest serverless option for the chosen GPU.

When the user wants to compare GPU prices:

tuna show-gpus
tuna show-gpus --gpu A100
tuna show-gpus --spot  # includes AWS spot prices

When the user asks "which providers support H100?" or a specific GPU:

tuna show-gpus --gpu H100

When the user wants to deploy on a specific provider: Use --serverless-provider <name>. Run tuna check --provider <name> first to verify credentials.

When the user wants to deploy a large model (70B+): Use multiple GPUs with tensor parallelism:

tuna deploy --model meta-llama/Llama-3-70b --gpu H100 --gpu-count 4 --tp-size 4

When the user wants to check if their setup is ready:

tuna check --provider modal
tuna check --provider runpod

When the user wants to see what's currently deployed:

tuna list
tuna list --status active

When the user wants to tear down everything:

tuna destroy --all

Supported GPUs

All GPU types that tuna supports across its providers:

GPU VRAM Architecture Available On
T4 16 GB Turing Modal, RunPod, Baseten, Azure, Cerebrium, Spot
A10 24 GB Ampere Cerebrium
A10G 24 GB Ampere Modal, Baseten, Spot
A4000 16 GB Ampere RunPod
A5000 24 GB Ampere RunPod
RTX 4090 24 GB Ada RunPod
L4 24 GB Ada Modal, RunPod, Cloud Run, Baseten, Cerebrium, Spot
A40 48 GB Ampere RunPod
A6000 48 GB Ampere RunPod
L40 48 GB Ada RunPod
L40S 48 GB Ada Modal, RunPod, Cerebrium, Spot
A100 (40 GB) 40 GB Ampere Modal, Cerebrium, Spot
A100 (80 GB) 80 GB Ampere Modal, RunPod, Azure, Baseten, Cerebrium, Spot
H100 80 GB Hopper Modal, RunPod, Baseten, Cerebrium, Spot
H200 141 GB Hopper Spot
B200 192 GB Blackwell Modal, Baseten
RTX PRO 6000 32 GB Blackwell Cloud Run

Use tuna show-gpus for current pricing across all providers.

Error Handling

Preflight check fails (tuna check): The output tells you exactly what's wrong — missing CLI tool, expired credentials, unregistered provider, insufficient quota. Fix the reported issue and re-run tuna check.

Deploy fails:

  1. Run tuna check --provider <provider> --gpu <gpu> to validate the environment
  2. Add -v for verbose logs: tuna deploy -v ...
  3. Check tuna status --service-name <name> for deployment state

Spot instance not available: Spot GPUs depend on cloud availability. If spot fails to launch, the serverless backend keeps serving — no downtime. Try a different region with --region, or use --serverless-only.

"No provider supports GPU X": Run tuna show-gpus --gpu <GPU> to see which providers offer that GPU. Not all GPUs are available on all providers.

Azure environment takes too long: First Azure deploy creates a GPU environment (~30 min). Subsequent deploys reuse it (~2 min). Use --azure-environment to specify an existing one.

推荐文章

更多
PHP时间戳与日期字符串相互转换方法详解

本文介绍PHP中时间数值(Unix时间戳)与日期字符串之间的相互转换方法。通过strtotime和date函数,实现将当前时间、指定日期转换为时间戳,以及将时间戳格式化为可读的日期时间字符串,并提供相关在线计算工具推荐。

2025.11.30 1,016
PHP跨域配置:怎么安全地允许指定域名而非使用通配符

在 PHP 中安全地允许指定域名跨域,核心是解析请求头中的 Origin ,验证其是否在白名单内,然后动态设置 Access-Control-Allow-Origin 响应头。不要使用通配符 * ,也不要硬编码单一域名。

2025.03.29 1,004
JavaScript中利用replace结合正则实现replaceAll效果

JavaScript原生仅支持replace()进行单次或全局替换,缺乏类似Java的replaceAll()便捷方法。本文总结四种在JS中实现全量替换的方案:使用带g标志的正则、带gm标志的正则、扩展String原型以及split后join。通过对比代码示例,展示各方法的实现细节与适用场景,帮助开发者根据需求选择最优解。

2025.04.29 1,002
PHP日期转时间戳时区偏差怎么解决

在 PHP 中将日期字符串转换为时间戳时,若未显式指定时区,默认使用脚本配置的 date.timezone 或系统时区。当服务器时区与业务逻辑预期(如 UTC )不一致时,会产生偏差。解决核心是确保输入字符串携带明确时区信息,或在转换前统一设置时区上下文。

2026.10.24 1,001
PHP集成RabbitMQ实现消息队列的完整步骤

使用 php-amqplib 库,通过建立连接、声明交换机与队列并绑定,即可在 PHP 中实现消息的发送与消费。

2026.05.24 1,001
Apache开启.htaccess及使用方法详解

本文介绍如何在本地Apache环境中启用.htaccess文件,主要涉及修改httpd.conf中的AllowOverride参数。同时详细解析.htaccess的多种实用功能,包括自定义错误页面、目录密码保护、IP访问限制、URL自动转向、默认首页设置以及防止图片盗链等配置方法,并分析了使用.htaccess对服务器性能和安全性的潜在影响。

2026.05.09 1,001
Skill 文件
  • SKILL.md
    • Tuna — Deploy and Serve LLM Models on GPU Infrastructure
    • Quick Start — Deploy a Model in 3 Commands
    • All Commands
      • tuna deploy — Launch a model on GPU
      • tuna show-gpus — Compare GPU Prices Across Providers
      • tuna check — Validate Provider Setup (Preflight)
      • tuna status — Check Deployment Status
      • tuna cost — Show Cost Savings Dashboard
      • tuna list — List All Deployments
      • tuna destroy — Tear Down a Deployment
    • Provider Setup Guide
      • Modal
      • RunPod
      • Google Cloud Run
      • Baseten
      • Azure Container Apps
      • Cerebrium
      • Spot GPUs (AWS via SkyPilot)
    • Common Scenarios
    • Supported GPUs
    • Error Handling
  • 项目或源文件

相关 Skill

更多
service-qa-coach service-qa-coach Review support quality for chat, email, phone, social DM, or marketplace service teams. Use when a team needs a QA scorecard, failure-mode analysis, coaching plan, calibration checklist, or service-improvement brief without live ticketing, CRM, or contact-center system access.
高中数学作业批改助手 高中数学作业批改助手 >图片识别 直接读取学生手写作答照片,识别公式、符号、步骤 🧮 自动推导 根据题目自动生成参考答案和评分细则,无需教师预设 📊 逐步给分 每个关键步骤独立评分,体现过程分 📝 结构化报告 输出含识别内容、参考答案、逐步评分、改进建议的完整报告 🗂 批量批改 支持一次性批改多道题,最终汇总得分表
Vibration Analysis Vibration Analysis 分析来自CMS趋势、RMS/峰值、频谱及SCADA报警的风机传动链(主轴、齿轮箱、发电机)振动数据。
Traditional Bone Tool Making Basics Traditional Bone Tool Making Basics Use when you need custom, durable, repairable tools like awls, needles, scrapers, harpoons, or fishing hooks made from local animal bones or antlers and comm...
音频混音工具 音频混音工具 名称:Sound Mixing Tool(标识 sound-mixing-tool) 短简介(≤60字):音乐/音效响度精确对齐 + 融合混音工作流:用 ffmpeg 两段式 loudnorm 把多组素材 LUFS 偏差压到 <0.10,再最小干预融合、导出可进引擎的独立分轨。 标签/关键词:音频混音 响度匹配 LUFS ffmpeg 游戏音频 音效设计 Wwise FMOD 分轨导出 后期处理 触发词:混音 · 响度匹配 · LUFS 对齐 · MIX 版本 · 音乐音效分轨 · 融合 · 不打架 · 不能盖住 适用场景 :游戏音频集成、影视短视频配乐、播客后期