Skip to content

Commit c12c88a

Browse files
authored
Adds the usage stats to all Text Gen models (#19492)
1 parent 06fa002 commit c12c88a

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

42 files changed

+888
-0
lines changed

src/content/workers-ai-models/deepseek-coder-6.7b-base-awq.json

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -353,6 +353,27 @@
353353
"type": "string",
354354
"description": "The generated text response from the model"
355355
},
356+
"usage": {
357+
"type": "object",
358+
"description": "Usage statistics for the inference request",
359+
"properties": {
360+
"prompt_tokens": {
361+
"type": "number",
362+
"description": "Total number of tokens in input",
363+
"default": 0
364+
},
365+
"completion_tokens": {
366+
"type": "number",
367+
"description": "Total number of tokens in output",
368+
"default": 0
369+
},
370+
"total_tokens": {
371+
"type": "number",
372+
"description": "Total number of input and output tokens",
373+
"default": 0
374+
}
375+
}
376+
},
356377
"tool_calls": {
357378
"type": "array",
358379
"description": "An array of tool calls requests made during the response generation",

src/content/workers-ai-models/deepseek-coder-6.7b-instruct-awq.json

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -353,6 +353,27 @@
353353
"type": "string",
354354
"description": "The generated text response from the model"
355355
},
356+
"usage": {
357+
"type": "object",
358+
"description": "Usage statistics for the inference request",
359+
"properties": {
360+
"prompt_tokens": {
361+
"type": "number",
362+
"description": "Total number of tokens in input",
363+
"default": 0
364+
},
365+
"completion_tokens": {
366+
"type": "number",
367+
"description": "Total number of tokens in output",
368+
"default": 0
369+
},
370+
"total_tokens": {
371+
"type": "number",
372+
"description": "Total number of input and output tokens",
373+
"default": 0
374+
}
375+
}
376+
},
356377
"tool_calls": {
357378
"type": "array",
358379
"description": "An array of tool calls requests made during the response generation",

src/content/workers-ai-models/deepseek-math-7b-instruct.json

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -357,6 +357,27 @@
357357
"type": "string",
358358
"description": "The generated text response from the model"
359359
},
360+
"usage": {
361+
"type": "object",
362+
"description": "Usage statistics for the inference request",
363+
"properties": {
364+
"prompt_tokens": {
365+
"type": "number",
366+
"description": "Total number of tokens in input",
367+
"default": 0
368+
},
369+
"completion_tokens": {
370+
"type": "number",
371+
"description": "Total number of tokens in output",
372+
"default": 0
373+
},
374+
"total_tokens": {
375+
"type": "number",
376+
"description": "Total number of input and output tokens",
377+
"default": 0
378+
}
379+
}
380+
},
360381
"tool_calls": {
361382
"type": "array",
362383
"description": "An array of tool calls requests made during the response generation",

src/content/workers-ai-models/discolm-german-7b-v1-awq.json

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -353,6 +353,27 @@
353353
"type": "string",
354354
"description": "The generated text response from the model"
355355
},
356+
"usage": {
357+
"type": "object",
358+
"description": "Usage statistics for the inference request",
359+
"properties": {
360+
"prompt_tokens": {
361+
"type": "number",
362+
"description": "Total number of tokens in input",
363+
"default": 0
364+
},
365+
"completion_tokens": {
366+
"type": "number",
367+
"description": "Total number of tokens in output",
368+
"default": 0
369+
},
370+
"total_tokens": {
371+
"type": "number",
372+
"description": "Total number of input and output tokens",
373+
"default": 0
374+
}
375+
}
376+
},
356377
"tool_calls": {
357378
"type": "array",
358379
"description": "An array of tool calls requests made during the response generation",

src/content/workers-ai-models/falcon-7b-instruct.json

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -353,6 +353,27 @@
353353
"type": "string",
354354
"description": "The generated text response from the model"
355355
},
356+
"usage": {
357+
"type": "object",
358+
"description": "Usage statistics for the inference request",
359+
"properties": {
360+
"prompt_tokens": {
361+
"type": "number",
362+
"description": "Total number of tokens in input",
363+
"default": 0
364+
},
365+
"completion_tokens": {
366+
"type": "number",
367+
"description": "Total number of tokens in output",
368+
"default": 0
369+
},
370+
"total_tokens": {
371+
"type": "number",
372+
"description": "Total number of input and output tokens",
373+
"default": 0
374+
}
375+
}
376+
},
356377
"tool_calls": {
357378
"type": "array",
358379
"description": "An array of tool calls requests made during the response generation",

src/content/workers-ai-models/gemma-2b-it-lora.json

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -353,6 +353,27 @@
353353
"type": "string",
354354
"description": "The generated text response from the model"
355355
},
356+
"usage": {
357+
"type": "object",
358+
"description": "Usage statistics for the inference request",
359+
"properties": {
360+
"prompt_tokens": {
361+
"type": "number",
362+
"description": "Total number of tokens in input",
363+
"default": 0
364+
},
365+
"completion_tokens": {
366+
"type": "number",
367+
"description": "Total number of tokens in output",
368+
"default": 0
369+
},
370+
"total_tokens": {
371+
"type": "number",
372+
"description": "Total number of input and output tokens",
373+
"default": 0
374+
}
375+
}
376+
},
356377
"tool_calls": {
357378
"type": "array",
358379
"description": "An array of tool calls requests made during the response generation",

src/content/workers-ai-models/gemma-7b-it-lora.json

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -353,6 +353,27 @@
353353
"type": "string",
354354
"description": "The generated text response from the model"
355355
},
356+
"usage": {
357+
"type": "object",
358+
"description": "Usage statistics for the inference request",
359+
"properties": {
360+
"prompt_tokens": {
361+
"type": "number",
362+
"description": "Total number of tokens in input",
363+
"default": 0
364+
},
365+
"completion_tokens": {
366+
"type": "number",
367+
"description": "Total number of tokens in output",
368+
"default": 0
369+
},
370+
"total_tokens": {
371+
"type": "number",
372+
"description": "Total number of input and output tokens",
373+
"default": 0
374+
}
375+
}
376+
},
356377
"tool_calls": {
357378
"type": "array",
358379
"description": "An array of tool calls requests made during the response generation",

src/content/workers-ai-models/gemma-7b-it.json

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -373,6 +373,27 @@
373373
"type": "string",
374374
"description": "The generated text response from the model"
375375
},
376+
"usage": {
377+
"type": "object",
378+
"description": "Usage statistics for the inference request",
379+
"properties": {
380+
"prompt_tokens": {
381+
"type": "number",
382+
"description": "Total number of tokens in input",
383+
"default": 0
384+
},
385+
"completion_tokens": {
386+
"type": "number",
387+
"description": "Total number of tokens in output",
388+
"default": 0
389+
},
390+
"total_tokens": {
391+
"type": "number",
392+
"description": "Total number of input and output tokens",
393+
"default": 0
394+
}
395+
}
396+
},
376397
"tool_calls": {
377398
"type": "array",
378399
"description": "An array of tool calls requests made during the response generation",

src/content/workers-ai-models/hermes-2-pro-mistral-7b.json

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -357,6 +357,27 @@
357357
"type": "string",
358358
"description": "The generated text response from the model"
359359
},
360+
"usage": {
361+
"type": "object",
362+
"description": "Usage statistics for the inference request",
363+
"properties": {
364+
"prompt_tokens": {
365+
"type": "number",
366+
"description": "Total number of tokens in input",
367+
"default": 0
368+
},
369+
"completion_tokens": {
370+
"type": "number",
371+
"description": "Total number of tokens in output",
372+
"default": 0
373+
},
374+
"total_tokens": {
375+
"type": "number",
376+
"description": "Total number of input and output tokens",
377+
"default": 0
378+
}
379+
}
380+
},
360381
"tool_calls": {
361382
"type": "array",
362383
"description": "An array of tool calls requests made during the response generation",

src/content/workers-ai-models/llama-2-13b-chat-awq.json

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -353,6 +353,27 @@
353353
"type": "string",
354354
"description": "The generated text response from the model"
355355
},
356+
"usage": {
357+
"type": "object",
358+
"description": "Usage statistics for the inference request",
359+
"properties": {
360+
"prompt_tokens": {
361+
"type": "number",
362+
"description": "Total number of tokens in input",
363+
"default": 0
364+
},
365+
"completion_tokens": {
366+
"type": "number",
367+
"description": "Total number of tokens in output",
368+
"default": 0
369+
},
370+
"total_tokens": {
371+
"type": "number",
372+
"description": "Total number of input and output tokens",
373+
"default": 0
374+
}
375+
}
376+
},
356377
"tool_calls": {
357378
"type": "array",
358379
"description": "An array of tool calls requests made during the response generation",

0 commit comments

Comments
 (0)