# How to Use Models from Other Sources like Hugging Face?

If you already have a model you’ve used elsewhere, or you’ve found an open-source model on Hugging Face that’s not directly supported on AI Studio, you can still fine-tune it using AI Studio.

Here’s a guide on how to bring your custom model into AI Studio for fine-tuning.

### Upload model through SDK <a href="#contentify_0" id="contentify_0"></a>

#### Step 1: Install the SDK CLI <a href="#contentify_1" id="contentify_1"></a>

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

#### Step 2: Setup environment variables <a href="#contentify_2" id="contentify_2"></a>

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

* Note:
  * FPT\_SPACE\_TOKEN: Please visit [https://ai.fptcloud.com/{{tenant\_name}}/user-token](https://ai.fptcloud.com/AIMKP-UTN-LINHHTM20/user-token) to generate your access token and paste it after FPT\_SPACE\_TOKEN= above
  * FPT\_TENANT\_ID: The ID of your tenant

#### Step 3: Upload model version <a href="#contentify_3" id="contentify_3"></a>

```
Copymodel_space model upload --model-id  --version-id  --path 
```

**Optional parameters**

* include:

Include only files that match the given regex patterns. Multiple patterns should be separated by commas

* exclude:

Exclude files that match the given regex patterns. You can also use commas to separate multiple patterns.

**Note**

* Make sure you have edited the tags to include the model size and chat template information
* Ensure that all files from external model sources are fully uploaded to the Model Hub


---

# 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/fpt-ai-studio/services/model-hub/tutorials/how-to-use-models-from-other-sources-like-hugging-face.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.
