Skip to content

Commit f2fccb1

Browse files
committed
added clarity on alias and model id
1 parent 2038f0a commit f2fccb1

File tree

1 file changed

+22
-7
lines changed

1 file changed

+22
-7
lines changed

articles/ai-foundry/foundry-local/reference/reference-cli.md

Lines changed: 22 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -35,16 +35,28 @@ The CLI organizes commands into three main categories:
3535

3636
The following table summarizes the commands related to managing and running models:
3737

38+
> [!NOTE]
39+
> You can specify the `model` argument by its **alias** or **model ID**. Using an alias will:
40+
> - Select the *best model* for your available hardware. For example, if you have a Nvidia CUDA GPU available, Foundry Local selects the CUDA model. If you have a supported NPU available, Foundry Local selects the NPU model.
41+
> - Allow you to use a shorter name without needing to remember the model ID.
42+
>
43+
> If you want to run a specific model, you can use the model ID. For example, to run the `qwen2.5-0.5b` on CPU - irrespective of your available hardware - use: `foundry model run qwen2.5-0.5b-instruct-generic-cpu`.
44+
45+
3846
| **Command** | **Description** |
3947
| -------------------------------------- | -------------------------------------------------------------------------------- |
4048
| `foundry model --help` | Displays all available model-related commands and their usage. |
41-
| `foundry model run <aliasOrModelId>` | Runs a specified model, downloading it if not cached, and starts an interaction. |
49+
| `foundry model run <model>` | Runs a specified model, downloading it if not cached, and starts an interaction. |
4250
| `foundry model list` | Lists all available models for local use. |
43-
| `foundry model info <aliasOrModelId>` | Displays detailed information about a specific model. |
44-
| `foundry model info <aliasOrModelId> --license` | Displays the license information for a specific model. |
45-
| `foundry model download <aliasOrModelId>` | Downloads a model to the local cache without running it. |
46-
| `foundry model load <aliasOrModelId>` | Loads a model into the service. |
47-
| `foundry model unload <aliasOrModelId>` | Unloads a model from the service. |
51+
| `foundry model info <model>` | Displays detailed information about a specific model. |
52+
| `foundry model info <model> --license` | Displays the license information for a specific model. |
53+
| `foundry model download <model>` | Downloads a model to the local cache without running it. |
54+
| `foundry model load <model>` | Loads a model into the service. |
55+
| `foundry model unload <model>` | Unloads a model from the service. **You must provide a valid model ID (not an alias).**. |
56+
57+
> [!IMPORTANT]
58+
> **For the `foundry model unload` command, you must provide a valid model ID (not an alias)** because you could have multiple models loaded with the same alias. For example, if you have `qwen2.5-0.5b-instruct-generic-cpu` *and*`qwen2.5-0.5b-instruct-cuda-gpu` loaded with both CPU and CUDA, you need to specify which one to unload.
59+
4860

4961
## Service commands
5062

@@ -70,5 +82,8 @@ The following table summarizes the commands related to managing the local cache
7082
| `foundry cache --help` | Displays all available cache-related commands and their usage. |
7183
| `foundry cache location` | Displays the current cache directory. |
7284
| `foundry cache list` | Lists all models stored in the local cache. |
73-
| `foundry cache remove <aliasOrModelId>` | Deletes a model from the local cache. |
7485
| `foundry cache cd <path>` | Changes the cache directory. |
86+
| `foundry cache remove <model>` | Deletes a model from the local cache. **You must provide a valid model ID (not an alias).** |
87+
88+
> [!IMPORTANT]
89+
> **For the `foundry cache remove` command, you must provide a valid model ID (not an alias)** because you could have multiple models on disk with the same alias. For example, if you downloaded both `qwen2.5-0.5b-instruct-generic-cpu` *and* `qwen2.5-0.5b-instruct-cuda-gpu`, you need to specify which one to remove.

0 commit comments

Comments
 (0)