Skip to content

Commit 5b2c04f

Browse files
authored
embedding : add --pooling option to README.md [no ci] (ggml-org#8934)
This commit adds the `--pooling` option to the README.md file in the `examples/embedding` directory. The motivation for adding this options is that currently if the model used does not specify a pooling type the embedding example will fail with the following error message: ```console main: error: pooling type NONE not supported ``` This commit also updates the name of the executable in the examples section.
1 parent 6f6496b commit 5b2c04f

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

examples/embedding/README.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,13 @@ To get started right away, run the following command, making sure to use the cor
99
### Unix-based systems (Linux, macOS, etc.):
1010

1111
```bash
12-
./llama-embedding -m ./path/to/model --log-disable -p "Hello World!" 2>/dev/null
12+
./llama-embedding -m ./path/to/model --pooling mean --log-disable -p "Hello World!" 2>/dev/null
1313
```
1414

1515
### Windows:
1616

1717
```powershell
18-
llama-embedding.exe -m ./path/to/model --log-disable -p "Hello World!" 2>$null
18+
llama-embedding.exe -m ./path/to/model --pooling mean --log-disable -p "Hello World!" 2>$null
1919
```
2020

2121
The above command will output space-separated float values.
@@ -50,11 +50,11 @@ The above command will output space-separated float values.
5050
### Unix-based systems (Linux, macOS, etc.):
5151

5252
```bash
53-
./embedding -p 'Castle<#sep#>Stronghold<#sep#>Dog<#sep#>Cat' --embd-separator '<#sep#>' --embd-normalize 2 --embd-output-format '' -m './path/to/model.gguf' --n-gpu-layers 99 --log-disable 2>/dev/null
53+
./llama-embedding -p 'Castle<#sep#>Stronghold<#sep#>Dog<#sep#>Cat' --pooling mean --embd-separator '<#sep#>' --embd-normalize 2 --embd-output-format '' -m './path/to/model.gguf' --n-gpu-layers 99 --log-disable 2>/dev/null
5454
```
5555

5656
### Windows:
5757

5858
```powershell
59-
embedding.exe -p 'Castle<#sep#>Stronghold<#sep#>Dog<#sep#>Cat' --embd-separator '<#sep#>' --embd-normalize 2 --embd-output-format '' -m './path/to/model.gguf' --n-gpu-layers 99 --log-disable 2>/dev/null
59+
llama-embedding.exe -p 'Castle<#sep#>Stronghold<#sep#>Dog<#sep#>Cat' --pooling mean --embd-separator '<#sep#>' --embd-normalize 2 --embd-output-format '' -m './path/to/model.gguf' --n-gpu-layers 99 --log-disable 2>/dev/null
6060
```

0 commit comments

Comments
 (0)