Created
November 8, 2025 15:08
-
-
Save ugovaretto/dffdbe838acdba09926417d1ce3ee28f to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env bash | |
| # $1: model file name | |
| # $2: port | |
| # $3: context size | |
| # $4: alias, (model name sent to client) | |
| # Define the help text as a function | |
| show_help() { | |
| echo "Usage: $0 <model file> <port> \\" | |
| echo " <context length, 0 for default> \\" | |
| echo " <alias, name returned to clients>" | |
| echo "Options:" | |
| echo " -h, --help Display this help message and exit." | |
| echo " <any other parameter> Execute the script's main logic." | |
| exit 0 | |
| } | |
| # Check for no arguments or the help flag | |
| if [ "$#" -eq 0 ] || [ "$1" == "-h" ] || [ "$1" == "--help" ]; then | |
| show_help | |
| fi | |
| llama-server -m $1 -ngl 99 \ | |
| --port $2 --host 0.0.0.0 \ | |
| --no-mmap --ctx-size $3 \ | |
| --temp 0.2 --top-p 0.90 \ | |
| --repeat-penalty 1.05 \ | |
| --min-p 0.05 \ | |
| --jinja --alias $4 | |
| # --model-draft $5 | |
| #--device-draft BLAS |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment