Skip to content

Commit cf94e0b

Browse files
committed
update nim example and upload a model
1 parent 84d2322 commit cf94e0b

File tree

2 files changed

+14
-6
lines changed

2 files changed

+14
-6
lines changed

bindings/main.nim

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,12 @@ import packages/docutils/highlite, terminal
55
var all_models: JsonNode = nil
66

77
proc show_help() =
8-
echo """
9-
Usage: ./program [OPTIONS]
8+
echo fmt"""
9+
Usage: {paramStr(0)} [OPTIONS]
1010
1111
A command-line interface for interacting with language models using libchatllm.
1212
13-
Options:
13+
Options (run `main -h` to get a full list of options):
1414
-m, --model <model_id> Specify the model to use (e.g., :qwen:1.5b)
1515
--embedding_model <model_id> Specify the embedding model to use
1616
--reranker_model <model_id> Specify the reranker model to use
@@ -21,9 +21,9 @@ Options:
2121
-h, --help Show this help message
2222
2323
Examples:
24-
./program -m :qwen:1.5b -p "Hello, world!"
25-
./program --interactive --model :qwen:1.5b
26-
./program --help
24+
{paramStr(0)} -m :qwen:1.5b -p "Hello, world!"
25+
{paramStr(0)} --interactive --model :qwen:1.5b
26+
{paramStr(0)} --help
2727
"""
2828

2929
proc get_model_url_on_modelscope(url: seq[string]): string =
@@ -211,6 +211,10 @@ var interactive: bool = false
211211
var reversed_role = false
212212
var use_multiple_lines = false
213213

214+
if paramCount() < 1:
215+
show_help()
216+
quit(0)
217+
214218
for i in 1 .. paramCount():
215219
if paramStr(i) in ["-h", "--help"]:
216220
show_help()

scripts/models.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3462,6 +3462,10 @@
34623462
"q8": {
34633463
"size": 17277819200,
34643464
"url": "chatllm_quantized_bailing/llada2.0-mini-preview.bin"
3465+
},
3466+
"q4_1": {
3467+
"size": 10166016368,
3468+
"url": "chatllm_quantized_bailing/llada2.0-mini-preview-q4_1.bin"
34653469
}
34663470
}
34673471
}

0 commit comments

Comments
 (0)