Unsloth MCP Server
アンスロートMCPサーバー
Unsloth用の MCP サーバー - メモリを 80% 削減しながら LLM の微調整を 2 倍高速化するライブラリ。
Unsloth とは何ですか?
Unsloth は、大規模な言語モデルの微調整の効率を劇的に向上させるライブラリです。
速度: 標準的な方法に比べて2倍高速な微調整
メモリ: VRAM使用量が80%削減され、コンシューマー向けGPUで大規模なモデルの微調整が可能
コンテキスト長: 最大13倍のコンテキスト長 (例: 80GB GPU 上の Llama 3.3 では 89K トークン)
精度: モデルの品質やパフォーマンスに損失はありません
Unsloth は、OpenAI の Triton 言語で記述されたカスタム CUDA カーネル、最適化されたバックプロパゲーション、および動的 4 ビット量子化を通じてこれらの改善を実現します。
Related MCP server: genpark-int8-symmetric-per-tensor-quantizer-skill
特徴
Llama、Mistral、Phi、Gemmaなどのモデルの微調整を最適化
効率的なトレーニングのための4ビット量子化
拡張コンテキスト長のサポート
モデルの読み込み、微調整、推論のためのシンプルなAPI
さまざまな形式(GGUF、Hugging Face など)にエクスポート
クイックスタート
Unsloth をインストール:
pip install unslothサーバーをインストールして構築します。
cd unsloth-server npm install npm run buildMCP設定に追加:
{ "mcpServers": { "unsloth-server": { "command": "node", "args": ["/path/to/unsloth-server/build/index.js"], "env": { "HUGGINGFACE_TOKEN": "your_token_here" // Optional }, "disabled": false, "autoApprove": [] } } }
利用可能なツール
インストールの確認
Unsloth がシステムに正しくインストールされているかどうかを確認します。
パラメータ: なし
例:
const result = await use_mcp_tool({
server_name: "unsloth-server",
tool_name: "check_installation",
arguments: {}
});サポートされているモデルの一覧
Llama、Mistral、Phi、Gemma のバリアントを含む、Unsloth でサポートされているすべてのモデルのリストを取得します。
パラメータ: なし
例:
const result = await use_mcp_tool({
server_name: "unsloth-server",
tool_name: "list_supported_models",
arguments: {}
});ロードモデル
推論と微調整を高速化するために、Unsloth 最適化を使用して事前トレーニング済みのモデルをロードします。
パラメータ:
model_name(必須): ロードするモデルの名前 (例: "unsloth/Llama-3.2-1B")max_seq_length(オプション):モデルの最大シーケンス長(デフォルト:2048)load_in_4bit(オプション): モデルを4ビット量子化でロードするかどうか (デフォルト: true)use_gradient_checkpointing(オプション): メモリを節約するために勾配チェックポイントを使用するかどうか (デフォルト: true)
例:
const result = await use_mcp_tool({
server_name: "unsloth-server",
tool_name: "load_model",
arguments: {
model_name: "unsloth/Llama-3.2-1B",
max_seq_length: 4096,
load_in_4bit: true
}
});微調整モデル
LoRA/QLoRA テクニックを使用して、Unsloth 最適化でモデルを微調整します。
パラメータ:
model_name(必須): 微調整するモデルの名前dataset_name(必須): 微調整に使用するデータセットの名前output_dir(必須): 微調整されたモデルを保存するディレクトリmax_seq_length(オプション):トレーニングの最大シーケンス長(デフォルト:2048)lora_rank(オプション):LoRA微調整のランク(デフォルト:16)lora_alpha(オプション): LoRA 微調整のためのアルファ (デフォルト: 16)batch_size(オプション):トレーニングのバッチサイズ(デフォルト:2)gradient_accumulation_steps(オプション): 勾配累積ステップ数 (デフォルト: 4)learning_rate(オプション):トレーニングの学習率(デフォルト:2e-4)max_steps(オプション):トレーニングステップの最大数(デフォルト:100)dataset_text_field(オプション): テキストを含むデータセット内のフィールド (デフォルト: 'text')load_in_4bit(オプション): 4ビット量子化を使用するかどうか (デフォルト: true)
例:
const result = await use_mcp_tool({
server_name: "unsloth-server",
tool_name: "finetune_model",
arguments: {
model_name: "unsloth/Llama-3.2-1B",
dataset_name: "tatsu-lab/alpaca",
output_dir: "./fine-tuned-model",
max_steps: 100,
batch_size: 2,
learning_rate: 2e-4
}
});テキストを生成する
微調整された Unsloth モデルを使用してテキストを生成します。
パラメータ:
model_path(必須): 微調整されたモデルへのパスprompt(必須): テキスト生成のプロンプトmax_new_tokens(オプション): 生成するトークンの最大数 (デフォルト: 256)temperature(オプション):テキスト生成時の温度(デフォルト:0.7)top_p(オプション):テキスト生成のTop-p(デフォルト:0.9)
例:
const result = await use_mcp_tool({
server_name: "unsloth-server",
tool_name: "generate_text",
arguments: {
model_path: "./fine-tuned-model",
prompt: "Write a short story about a robot learning to paint:",
max_new_tokens: 512,
temperature: 0.8
}
});エクスポートモデル
微調整された Unsloth モデルを展開用にさまざまな形式でエクスポートします。
パラメータ:
model_path(必須): 微調整されたモデルへのパスexport_format(必須): エクスポートする形式 (gguf、ollama、vllm、huggingface)output_path(必須): エクスポートされたモデルを保存するパスquantization_bits(オプション):量子化ビット数(GGUFエクスポート用)(デフォルト:4)
例:
const result = await use_mcp_tool({
server_name: "unsloth-server",
tool_name: "export_model",
arguments: {
model_path: "./fine-tuned-model",
export_format: "gguf",
output_path: "./exported-model.gguf",
quantization_bits: 4
}
});高度な使用法
カスタムデータセット
カスタム データセットは、適切にフォーマットして Hugging Face でホストするか、ローカル パスを提供することで使用できます。
const result = await use_mcp_tool({
server_name: "unsloth-server",
tool_name: "finetune_model",
arguments: {
model_name: "unsloth/Llama-3.2-1B",
dataset_name: "json",
data_files: {"train": "path/to/your/data.json"},
output_dir: "./fine-tuned-model"
}
});メモリ最適化
限られたハードウェア上の大規模モデルの場合:
バッチサイズを減らし、勾配蓄積ステップを増やす
4ビット量子化を使用する
勾配チェックポイントを有効にする
可能であればシーケンスの長さを短くする
トラブルシューティング
よくある問題
CUDA メモリ不足: バッチサイズを小さくするか、4 ビット量子化を使用するか、より小さなモデルを試してください
インポートエラー: torch、transformers、unsloth の正しいバージョンがインストールされていることを確認してください
モデルが見つかりません: サポートされているモデル名を使用しているか、プライベートモデルにアクセスできるかどうかを確認してください
バージョンの互換性
Python: 3.10、3.11、または 3.12 (3.13 は不可)
CUDA: 11.8 または 12.1 以上を推奨
PyTorch: 2.0以上を推奨
パフォーマンスベンチマーク
モデル | VRAM | アンスローススピード | VRAM削減 | コンテキストの長さ |
ラマ 3.3 (70B) | 80GB | 2倍高速 | >75% | 13倍長い |
ラマ 3.1 (8B) | 80GB | 2倍高速 | >70% | 12倍長い |
ミストラル v0.3 (7B) | 80GB | 2.2倍高速 | 75%減 | - |
要件
Python 3.10-3.12
CUDA 対応の NVIDIA GPU (推奨)
Node.jsとnpm
ライセンス
Apache 2.0
Available Tools
6 toolscheck_installationB
Check if Unsloth is properly installed
Inputs: no named parameters.
export_modelB
Export a fine-tuned Unsloth model to various formats
Inputs: model_path (required), export_format (required), output_path (required), quantization_bits.
finetune_modelC
Fine-tune a model with Unsloth optimizations
Inputs: model_name (required), dataset_name (required), output_dir (required), max_seq_length, +8 more.
generate_textC
Generate text using a fine-tuned Unsloth model
Inputs: model_path (required), prompt (required), max_new_tokens, temperature, +1 more.
list_supported_modelsB
List all models supported by Unsloth
Inputs: no named parameters.
load_modelC
Load a pretrained model with Unsloth optimizations
Inputs: model_name (required), max_seq_length, load_in_4bit, use_gradient_checkpointing.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 6 tools
Each tool has a clearly distinct purpose with no overlap: checking installation, listing models, loading models, fine-tuning, generating text, and exporting models. The descriptions make it unambiguous which tool to use for each step in the workflow.
All tools follow a consistent verb_noun pattern with clear, descriptive names (e.g., check_installation, export_model, finetune_model). There are no deviations in naming conventions or style mixing.
With 6 tools, this server is well-scoped for its purpose of fine-tuning and using models with Unsloth optimizations. Each tool earns its place by covering a distinct, essential operation in the model lifecycle.
The tool set provides complete coverage for the domain: from checking prerequisites and listing models, through loading, fine-tuning, and generating text, to exporting the final model. There are no obvious gaps or dead ends in the workflow.
Maintenance
Related MCP Connectors
LLM chat, text tools, image generation, editing, batch image jobs, and asynchronous video generation
Optimize your Hugging Face model for your GPU type, plus RightNow open models and data retention.
33 tools: LLM chat, summaries, translation, embeddings, speech, images. From $0.002.
Live prices, cost estimates and retirement dates for 4,100+ LLMs. Remote, no key needed.
Related MCP Servers
- AlicenseAqualityAmaintenanceOwn your sovereign AI model. Domain-specific fine-tuning of open-source LLMs and SLMs with total control and zero infrastructure hassle. Tuning Engines provides specialized tuning agents to tailor top open models to your needs — fast, predictable, fully delivered. Fine-tune Qwen, Llama, DeepSeek, Mistral, Gemma, Phi, StarCoder, and CodeLlama models from 1B to 72B parameters on your data via CLI o38184 npm6MIT
- AlicenseNot gradedqualityBmaintenanceEnables zero-dependency INT8 symmetric quantization of LLM weights and activations on a per-tensor or per-channel basis, reporting SNR and MSE reconstruction telemetry along with TTFT/TPOT latency and jitter metrics. Also exposes edge inference primitives such as PagedAttention block allocation, radix prefix caching, and speculative decoding verification through the Model Context Protocol.7MIT
- AlicenseNot gradedqualityBmaintenanceEnables MCP clients to manage LLM inference memory through virtual paged-attention KV-cache block mapping, non-contiguous physical page allocation, zero-copy fragmentation tracking, radix-trie prefix caching, INT8 quantized compute, and speculative decoding verification. It also exposes prefill and decode latency telemetry so edge deployments can be benchmarked and tuned without external dependencies.7MIT
- AlicenseNot gradedqualityNot gradedmaintenanceEnables profiling and optimizing edge and on-device LLM inference by measuring TTFT, TPOT, tokens/second throughput, and P50/P90/P99 jitter while providing standard-library primitives for quantization, paged attention, speculative decoding, and prefix caching.MIT