Skip to content
This repository was archived by the owner on Jul 4, 2025. It is now read-only.

Commit 870fb47

Browse files
committed
update
1 parent 6e11aa4 commit 870fb47

File tree

1 file changed

+64
-11
lines changed

1 file changed

+64
-11
lines changed

docs/docs/hub/index.mdx

Lines changed: 64 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,8 @@ Cortex provides a streamlined way to pull (download) machine learning models fro
3232

3333
For pulling models from [Cortex model registry](https://huggingface.co/cortexso), simply type `cortex pull <model_name>` to your terminal.
3434

35-
```
36-
$ cortex pull tinyllama
35+
```sh
36+
cortex pull tinyllama
3737
Downloaded models:
3838
tinyllama:1b-gguf
3939

@@ -53,11 +53,49 @@ Available to download:
5353
Select a model (1-11):
5454
```
5555

56+
#### Pulling models with repository handle
57+
58+
When user want to pull a model which is not ready in [Cortex model registry](https://huggingface.co/cortexso), user can provide the repository handle to Cortex.
59+
60+
For example, we can pull model from [QuantFactory-FinanceLlama3](https://huggingface.co/QuantFactory/finance-Llama3-8B-GGUF) by enter to terminal `cortex pull QuantFactory/finance-Llama3-8B-GGUF`.
61+
62+
```sh
63+
cortex pull QuantFactory/finance-Llama3-8B-GGUF
64+
Select an option
65+
1. finance-Llama3-8B.Q2_K.gguf
66+
2. finance-Llama3-8B.Q3_K_L.gguf
67+
3. finance-Llama3-8B.Q3_K_M.gguf
68+
4. finance-Llama3-8B.Q3_K_S.gguf
69+
5. finance-Llama3-8B.Q4_0.gguf
70+
6. finance-Llama3-8B.Q4_1.gguf
71+
7. finance-Llama3-8B.Q4_K_M.gguf
72+
8. finance-Llama3-8B.Q4_K_S.gguf
73+
9. finance-Llama3-8B.Q5_0.gguf
74+
10. finance-Llama3-8B.Q5_1.gguf
75+
11. finance-Llama3-8B.Q5_K_M.gguf
76+
12. finance-Llama3-8B.Q5_K_S.gguf
77+
13. finance-Llama3-8B.Q6_K.gguf
78+
14. finance-Llama3-8B.Q8_0.gguf
79+
80+
Select an option (1-14):
81+
```
82+
83+
#### Pulling models with direct url
84+
85+
Clients can pull models directly using a URL. This allows for the direct download of models from a specified location without additional configuration.
86+
87+
```sh
88+
cortex pull https://huggingface.co/QuantFactory/OpenMath2-Llama3.1-8B-GGUF/blob/main/OpenMath2-Llama3.1-8B.Q4_0.gguf
89+
Validating download items, please wait..
90+
Start downloading..
91+
QuantFactory:OpenMat 0%[==================================================] [00m:00s] 3.98 MB/0.00 B
92+
```
93+
5694
### Pulling Models via HTTP API
5795

5896
To pull a model using the HTTP API, make a `POST` request to the following endpoint:
5997

60-
```curl
98+
```sh
6199
curl --request POST \
62100
--url http://localhost:39281/v1/models/pull \
63101
--header 'Content-Type: application/json' \
@@ -206,8 +244,8 @@ The DownloadSuccess event indicates that all items in the download task have bee
206244

207245
You can list your ready-to-use models via CLI using `cortex models list` command.
208246

209-
```
210-
$ cortex models list
247+
```sh
248+
cortex models list
211249
+---------+-------------------+
212250
| (Index) | ID |
213251
+---------+-------------------+
@@ -217,8 +255,8 @@ $ cortex models list
217255

218256
For more options, use `cortex models list --help` command.
219257

220-
```
221-
$ cortex models list -h
258+
```sh
259+
cortex models list -h
222260
List all local models
223261
Usage:
224262
cortex models [options] [subcommand]
@@ -232,13 +270,28 @@ Options:
232270
-v,--version Display version
233271
```
234272

235-
### List local-available models via HTTP API
273+
### Aborting Download Task
236274

237-
This section describes how to list all models that are available locally on your system using the HTTP API. By making a GET request to the specified endpoint, you can retrieve a list of models along with their details, such as model ID, name, file paths, engine type, and version. This is useful for managing and verifying the models you have downloaded and are ready to use in your local environment.
275+
Clients can abort a downloading task using the task ID. Below is a sample `curl` command to abort a download task:
238276

277+
```sh
278+
curl --location --request DELETE 'http://127.0.0.1:3928/models/pull' \
279+
--header 'Content-Type: application/json' \
280+
--data '{
281+
"taskId": "tinyllama:1b-gguf-q2-k"
282+
}'
239283
```
240-
$ curl --request GET \
241-
--url http://127.0.0.1:39281/v1/models
284+
285+
An event with type `DownloadStopped` will be emitted when the task is successfully aborted.
286+
287+
### Listing local-available models via HTTP API
288+
289+
This section describes how to list all models that are available locally on your system using the HTTP API. By making a GET request to the specified endpoint, you can retrieve a list of models along with their details, such as model ID, name, file paths, engine type, and version. This is useful for managing and verifying the models you have downloaded and are ready to use in your local environment.
290+
291+
```sh
292+
curl --request GET \
293+
--url http://127.0.0.1:39281/v1/models
294+
242295
```
243296

244297
Response:

0 commit comments

Comments
 (0)