> For the complete documentation index, see [llms.txt](https://ai-docs.fptcloud.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://ai-docs.fptcloud.com/ai-factory-guideline-jp/fpt-ai-studio/sbisu/moderuhabu/chtoriaru/hugging-facenadonossunomoderuwosu-ru.md).

# 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
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

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

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

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

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
