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

Update index.html

Browse files
Files changed (1) hide show
  1. index.html +3 -0
index.html CHANGED
@@ -1139,12 +1139,15 @@
1139
  const generationStart = performance.now();
1140
  let ttftRecorded = false;
1141
  let ttft = 0;
 
1142
 
1143
  const output = await model.generate({
1144
  ...inputs,
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;
 
1139
  const generationStart = performance.now();
1140
  let ttftRecorded = false;
1141
  let ttft = 0;
1142
+ let callbackCount = 0;
1143
 
1144
  const output = await model.generate({
1145
  ...inputs,
1146
  max_new_tokens: 128,
1147
  do_sample: false,
1148
  callback_function: (tokens) => {
1149
+ callbackCount++;
1150
+ console.log(`🔍 Callback #${callbackCount}, tokens:`, tokens);
1151
  // Record TTFT on first callback (first token generated)
1152
  if (!ttftRecorded) {
1153
  ttft = performance.now() - generationStart;