Commit d733056
@FIR-754: Added all parameter parsing for the llama-cli (#18)
* @FIR-754: Added all parameter parsing for the llama-cli
The test results are as follows
Model Response
cd /usr/bin/tsi/v0.1.1.tsv31_06_06_2025/bin/; ./run_llama_cli.sh "My cat's name"
" 50 tinyllama-vo-5m-para.gguf tSavorite 1.5 1024 50 0.9 5 12288 0.0
[2018-03-09 13:03:17.788243] 271:272 [[32m info[m] :: </proj/work/mmankali/bld-setuptest/tsirel-31/tsi_yocto_workspace/tsi-apc-manager/platform/rsm_mgr/rsm_process_req.c:129> TXE resource allocation request processed successfully.
My cat's name was Tim. He loved to play with his toy car. He would run and jump in the park, making loud noises. Tim was very happy with his new toy car.
One day, Tim's mom said, "Tim. You
llama_perf_sampler_print: sampling time = 999.96 ms / 56 runs ( 17.86 ms per token, 56.00 tokens per second)llama_perf_context_print: load time = 1713.55 ms
llama_perf_context_print: prompt eval time = 603.51 ms / 6 tokens ( 100.58 ms per token, 9.94 tokens per second)
llama_perf_context_print: eval time = 7069.36 ms / 49 runs ( 144.27 ms per token, 6.93 tokens per second)
llama_perf_context_print: total time = 10046.17 ms / 55 tokens
[2018-03-09 13:03:28.875126] 271:272 [[32m info[m] :: </proj/work/mmankali/bld-setuptest/tsirel-31/tsi_yocto_workspace/tsi-apc-manager/platform/rsm_mgr/rsm_process_req.c:145> TXE resource release request processed successfully.
GGML Tsavorite Profiling Results:
------------------------------------------------------------------------------------------------------------------------
Calls Total(ms) T/call Self(ms) Function
------------------------------------------------------------------------------------------------------------------------
2715 2720.000 1.002 0.000 [25%] RuntimeHostShim::awaitCommandListCompletion
1740 2635.984 1.515 2635.984 └─ [24%] [ txe_silu ]
925 1379.715 1.492 1379.715 └─ [12%] [ txe_mult ]
50 74.450 1.489 74.450 └─ [ 1%] [ txe_add ]
2715 0.448 0.000 0.448 └─ [ 0%] TXE 0 Idle
1 34.000 34.000 34.000 [ 0%] RuntimeHostShim::finalize
1 16.000 16.000 1.000 [ 0%] GGML Tsavorite
1 15.000 15.000 15.000 └─ [ 0%] RuntimeHostShim::initialize
2716 0.000 0.000 0.000 [ 0%] RuntimeHostShim::allocate
9120 0.000 0.000 0.000 [ 0%] RuntimeHostShim::getShmemManager
2715 0.000 0.000 0.000 [ 0%] RuntimeHostShim::createCommandList
2715 0.000 0.000 0.000 [ 0%] RuntimeHostShim::loadBlob
2715 0.000 0.000 0.000 [ 0%] RuntimeHostShim::launchBlob
2715 0.000 0.000 0.000 [ 0%] RuntimeHostShim::addCommandToList
2715 0.000 0.000 0.000 [ 0%] RuntimeHostShim::finalizeCommandList
2715 0.000 0.000 0.000 [ 0%] RuntimeHostShim::unloadBlob
2715 0.000 0.000 0.000 [ 0%] RuntimeHostShim::deallocate
========================================================================================================================
33558 11098.000 0.331 11098.000 [100%] TOTAL
========================================================================================================================
⟵ Back to Form
The URL used is as follows
http://10.50.0.124:5003/llama-cli?model=tiny-llama&backend=tSavorite&tokens=10&prompt=My+cat%27s+name&repeat-penalty=1.5&batch-size=1024&top-k=50&top-p=0.9&last-n=5&context-length=12288&temp=0.0
* @FIR-754: Addressed review comments.
---------
Co-authored-by: Ashish Trivedi <[email protected]>1 parent 6047d7a commit d733056
1 file changed
+26
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
| 13 | + | |
13 | 14 | | |
| 15 | + | |
14 | 16 | | |
15 | 17 | | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
16 | 26 | | |
17 | 27 | | |
18 | 28 | | |
| |||
25 | 35 | | |
26 | 36 | | |
27 | 37 | | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
28 | 45 | | |
29 | 46 | | |
30 | 47 | | |
| |||
51 | 68 | | |
52 | 69 | | |
53 | 70 | | |
54 | | - | |
| 71 | + | |
55 | 72 | | |
56 | 73 | | |
57 | 74 | | |
| |||
167 | 184 | | |
168 | 185 | | |
169 | 186 | | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
170 | 194 | | |
171 | 195 | | |
172 | 196 | | |
| |||
192 | 216 | | |
193 | 217 | | |
194 | 218 | | |
195 | | - | |
| 219 | + | |
196 | 220 | | |
197 | 221 | | |
198 | 222 | | |
| |||
0 commit comments