captainspock commited on
Commit
6d815e5
·
verified ·
1 Parent(s): 2255561

Update index.html

Browse files
Files changed (1) hide show
  1. index.html +2 -2
index.html CHANGED
@@ -1145,8 +1145,8 @@
1145
  max_new_tokens: 128,
1146
  do_sample: false,
1147
  callback_function: (tokens) => {
1148
- // Record TTFT on first token
1149
- if (!ttftRecorded && tokens.length > 0) {
1150
  ttft = performance.now() - generationStart;
1151
  ttftRecorded = true;
1152
  console.log(`⚡ Time to First Token (TTFT): ${ttft.toFixed(2)}ms`);
 
1145
  max_new_tokens: 128,
1146
  do_sample: false,
1147
  callback_function: (tokens) => {
1148
+ // Record TTFT on first callback (first token generated)
1149
+ if (!ttftRecorded) {
1150
  ttft = performance.now() - generationStart;
1151
  ttftRecorded = true;
1152
  console.log(`⚡ Time to First Token (TTFT): ${ttft.toFixed(2)}ms`);