agentsclimarketplace

Together cost tuning

Skill jeremylongshore/claude-code-plugins-plus-skills/plugins/saas-packs/together-pack/skills/together-cost-tuning

'Together AI cost tuning for inference, fine-tuning, and model deployment.From its SKILL.md

Install
npx -y skills add jeremylongshore/claude-code-plugins-plus-skills --skill together-cost-tuning

Assembled from the repository path, not quoted from the project. Check it against their README if it does not work.

What its file declares

Copied from the file, not written here

The file declares its own license as MIT. That is the author’s claim about this one file, and it is not the same thing as the license GitHub reports for the repository, which is listed with the other numbers below.

SKILL.md

2.3 KB, 575 tokens by cl100k_base, as published. Nobody here has run it

Together AI Cost Tuning

Overview

Optimize Together AI costs with model selection, batching, and caching.

Instructions

Together AI Pricing Model

Model CategoryPrice (per 1M tokens)Example Models
Small (< 10B)$0.10-0.30Llama-3.2-3B, Qwen-2.5-7B
Medium (10-40B)$0.60-1.20Mixtral-8x7B, Llama-3.3-70B-Turbo
Large (40B+)$2.00-5.00Llama-3.1-405B, DeepSeek-V3
Image gen$0.003-0.05/imageFLUX.1-schnell, SDXL
Embeddings$0.008/1M tokensM2-BERT
Fine-tuning~$5-25/hourDepends on model + GPU
Batch inference50% offSame models, async

Cost Reduction Strategies

# 1. Use Turbo variants (faster, cheaper, similar quality)
# meta-llama/Llama-3.3-70B-Instruct-Turbo vs Llama-3.1-70B-Instruct

# 2. Batch inference (50% cost reduction)
batch_response = client.batch.create(
    input_file_id=file_id,
    model="meta-llama/Llama-3.3-70B-Instruct-Turbo",
    completion_window="24h",
)

# 3. Cache responses for identical prompts
from functools import lru_cache

@lru_cache(maxsize=1000)
def cached_completion(prompt: str, model: str) -> str:
    response = client.chat.completions.create(
        model=model, messages=[{"role": "user", "content": prompt}],
    )
    return response.choices[0].message.content

# 4. Use smallest model that works
# Test with 3B first, upgrade to 70B only if quality insufficient

Error Handling

IssueCauseSolution
High costsWrong model tierDownsize model
Batch failuresInvalid input formatValidate JSONL
Fine-tuning expensiveToo many epochsStart with 1-2 epochs

Resources

Next Steps

For architecture patterns, see together-reference-architecture.

What ships with it

Read from the repository

Just SKILL.md. No reference files, no scripts.

Keep looking

Skills are one crate of 326,144. Ordering is by how many stacks a row turns up in, so the top of any crate is what has actually been picked rather than what has the most stars.