@@ -66,7 +66,7 @@ export class BenchmarkCliUsecases {
6666 if ( ! model )
6767 throw new Error ( 'Model is not started, please try again!' ) ;
6868 } )
69- . then ( ( ) => this . runBenchmarks ( ) )
69+ . then ( ( ) => this . runBenchmarks ( model ) )
7070 . then ( ( ) => {
7171 serveProcess . kill ( ) ;
7272 process . exit ( 0 ) ;
@@ -136,19 +136,26 @@ export class BenchmarkCliUsecases {
136136 * Benchmark a user using the OpenAI API
137137 * @returns
138138 */
139- private async benchmarkUser ( ) {
139+ private async benchmarkUser ( model : string ) {
140140 const startResources = await this . getSystemResources ( ) ;
141141 const start = Date . now ( ) ;
142142 let tokenCount = 0 ;
143143 let firstTokenTime = null ;
144144
145145 try {
146+ console . log ( 'Benchmarking user...' , {
147+ model,
148+ messages : this . config . api . parameters . messages ,
149+ max_tokens : this . config . api . parameters . max_tokens ,
150+ stream : true ,
151+ } ) ;
146152 const stream = await this . cortexClient ! . chat . completions . create ( {
147- model : this . config . api . parameters . model ,
153+ model,
148154 messages : this . config . api . parameters . messages ,
149155 max_tokens : this . config . api . parameters . max_tokens ,
150156 stream : true ,
151157 } ) ;
158+
152159
153160 for await ( const chunk of stream ) {
154161 if ( ! firstTokenTime && chunk . choices [ 0 ] ?. delta ?. content ) {
@@ -204,7 +211,7 @@ export class BenchmarkCliUsecases {
204211 /**
205212 * Run the benchmarks
206213 */
207- private async runBenchmarks ( ) {
214+ private async runBenchmarks ( model : string ) {
208215 const allResults : any [ ] = [ ] ;
209216 const rounds = this . config . num_rounds || 1 ;
210217
@@ -216,7 +223,7 @@ export class BenchmarkCliUsecases {
216223 const hardwareBefore = await this . getSystemResources ( ) ;
217224
218225 for ( let j = 0 ; j < this . config . concurrency ; j ++ ) {
219- const result = await this . benchmarkUser ( ) ;
226+ const result = await this . benchmarkUser ( model ) ;
220227 if ( result ) {
221228 roundResults . push ( result ) ;
222229 }
0 commit comments