# Hugging Faceなどの外部ソースのモデルを使用す る方法

既に他の場所で使用したモデルをお持ちの場合、またはHugging FaceでAI Studioに直接サポートされていないオープンソースモデルを見つけた場合でも、AI Studioを使用して微調整できます。

カスタムモデルをAI Studioにインポートして微調整する方法について、以下のガイドをご参照ください。

### SDK経由でのモデルアップロード <a href="#contentify_0" id="contentify_0"></a>

#### ステップ1: SDK CLIのインストール <a href="#contentify_1" id="contentify_1"></a>

```
pip install https://s3-han02.fptcloud.com/modelhubsdk/ai-studio/model_space-0.2.5.9-py3-none-any.whl
```

#### ステップ2: 環境変数の設定 <a href="#contentify_2" id="contentify_2"></a>

```
export FPT_SPACE_URL="https://ai-api.fptcloud.com"
export FPT_SPACE_TOKEN=""
export FPT_TENANT_ID=""
```

* 注:
  * FPT\_SPACE\_TOKEN: アクセス トークンを生成するには、[https://ai.fptcloud.com/{{tenant\_name}}/user-token](https://ai.fptcloud.com/%7B%7Btenant_name%7D%7D/user-token) にアクセスし、生成されたトークンを上記の FPT\_SPACE\_TOKEN= の後に貼り付けてください。
  * FPT\_TENANT\_ID: お客様のテナントID

#### ステップ3: モデルバージョンのアップロード <a href="#contentify_3" id="contentify_3"></a>

```
model_space model upload --model-id  --version-id  --path 
```

**オプションのパラメータ**

* 含む:

指定された正規表現パターンに一致するファイルのみを含めます。複数のパターンはカンマで区切ってください

* 除外する:

指定された正規表現パターンに一致するファイルを除外します。複数のパターンもカンマで区切ることができます。

**注記**

* モデルサイズとチャットテンプレート情報を含むようタグを編集したことを確認してください
* 外部モデルソースからの全ファイルがモデルハブに完全にアップロードされていることを確認してください


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://ai-docs.fptcloud.com/ai-factory-guideline-jp/fpt-ai-studio/sbisu/moderuhabu/chtoriaru/hugging-facenadonossunomoderuwosu-ru.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
