Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/components/models/ModelBadges.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ const ModelBadges = ({ model }: { model: WorkersAIModelsSchema }) => {
}

if (property_id === "planned_deprecation_date") {
const timestamp = Math.floor(new Date(value).getTime() / 1000);
const timestamp = Math.floor(new Date(value as string).getTime() / 1000);

if (Date.now() > timestamp) {
return { variant: "danger", text: "Deprecated" };
Expand Down
18 changes: 17 additions & 1 deletion src/components/models/ModelFeatures.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,11 @@ import type { WorkersAIModelsSchema } from "~/schemas";

const ModelFeatures = ({ model }: { model: WorkersAIModelsSchema }) => {
const nf = new Intl.NumberFormat("en-US");
const currencyFormatter = new Intl.NumberFormat("en-US", {
style: "currency",
currency: "USD",
maximumFractionDigits: 10,
});
const properties: any = {};
model.properties.forEach((property: any) => {
properties[property.property_id] = property.value;
Expand All @@ -15,7 +20,7 @@ const ModelFeatures = ({ model }: { model: WorkersAIModelsSchema }) => {
<thead>
<tr>
<>
<th>Features</th>
<th>Model Info</th>
<th />
</>
</tr>
Expand Down Expand Up @@ -105,6 +110,17 @@ const ModelFeatures = ({ model }: { model: WorkersAIModelsSchema }) => {
<td>Yes</td>
</tr>
)}
{properties.price &&
properties.price.map(
(price: { price: number; unit: string }) => (
<tr key={price.price}>
<td>Pricing</td>
<td>
{currencyFormatter.format(price.price)} {price.unit}
</td>
</tr>
),
)}
</tbody>
</table>
</>
Expand Down
1 change: 1 addition & 0 deletions src/content/workers-ai-models/bart-large-cnn.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
"name": "Summarization",
"description": "Summarization is the task of producing a shorter version of a document while preserving its important information. Some models can extract text from the original input, while other models can generate entirely new text."
},
"created_at": "2024-02-27 18:28:11.833",
"tags": [],
"properties": [
{
Expand Down
11 changes: 9 additions & 2 deletions src/content/workers-ai-models/bge-base-en-v1.5.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,18 @@
"name": "Text Embeddings",
"description": "Feature extraction models transform raw data into numerical features that can be processed while preserving the information in the original dataset. These models are ideal as part of building vector search applications or Retrieval Augmented Generation workflows with Large Language Models (LLM)."
},
"created_at": "2023-09-25 19:21:11.898",
"tags": [],
"properties": [
{
"property_id": "beta",
"value": "false"
"property_id": "price",
"value": [
{
"unit": "per M input tokens",
"price": 0.067,
"currency": "USD"
}
]
},
{
"property_id": "info",
Expand Down
11 changes: 9 additions & 2 deletions src/content/workers-ai-models/bge-large-en-v1.5.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,18 @@
"name": "Text Embeddings",
"description": "Feature extraction models transform raw data into numerical features that can be processed while preserving the information in the original dataset. These models are ideal as part of building vector search applications or Retrieval Augmented Generation workflows with Large Language Models (LLM)."
},
"created_at": "2023-11-07 15:43:58.042",
"tags": [],
"properties": [
{
"property_id": "beta",
"value": "false"
"property_id": "price",
"value": [
{
"unit": "per M input tokens",
"price": 0.2,
"currency": "USD"
}
]
},
{
"property_id": "info",
Expand Down
142 changes: 120 additions & 22 deletions src/content/workers-ai-models/bge-m3.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,42 +8,96 @@
"name": "Text Embeddings",
"description": "Feature extraction models transform raw data into numerical features that can be processed while preserving the information in the original dataset. These models are ideal as part of building vector search applications or Retrieval Augmented Generation workflows with Large Language Models (LLM)."
},
"created_at": "2024-05-22 19:27:09.781",
"tags": [],
"properties": [],
"properties": [
{
"property_id": "price",
"value": [
{
"unit": "per M input tokens",
"price": 0.012,
"currency": "USD"
}
]
}
],
"schema": {
"input": {
"type": "object",
"properties": {
"query": {
"type": "string",
"minLength": 1,
"description": "A query you wish to perform against the provided contexts. If no query is provided the model with respond with embeddings for contexts"
"oneOf": [
{
"title": "BGE M3 Input Query and Contexts",
"properties": {
"query": {
"type": "string",
"minLength": 1,
"description": "A query you wish to perform against the provided contexts. If no query is provided the model with respond with embeddings for contexts"
},
"contexts": {
"type": "array",
"items": {
"type": "object",
"properties": {
"text": {
"type": "string",
"minLength": 1,
"description": "One of the provided context content"
}
}
},
"description": "List of provided contexts. Note that the index in this array is important, as the response will refer to it."
},
"truncate_inputs": {
"type": "boolean",
"default": false,
"description": "When provided with too long context should the model error out or truncate the context to fit?"
}
},
"required": [
"contexts"
]
},
"contexts": {
"type": "array",
"items": {
"type": "object",
"properties": {
"text": {
"type": "string",
"minLength": 1,
"description": "One of the provided context content"
}
{
"title": "BGE M3 Input Embedding",
"properties": {
"text": {
"oneOf": [
{
"type": "string",
"description": "The text to embed",
"minLength": 1
},
{
"type": "array",
"description": "Batch of text values to embed",
"items": {
"type": "string",
"description": "The text to embed",
"minLength": 1
},
"maxItems": 100
}
]
},
"truncate_inputs": {
"type": "boolean",
"default": false,
"description": "When provided with too long context should the model error out or truncate the context to fit?"
}
},
"description": "List of provided contexts. Note that the index in this array is important, as the response will refer to it."
"required": [
"text"
]
}
},
"required": [
"contexts"
]
},
"output": {
"type": "object",
"contentType": "application/json",
"oneOf": [
{
"title": "Query",
"title": "BGE M3 Ouput Query",
"properties": {
"response": {
"type": "array",
Expand All @@ -64,7 +118,7 @@
}
},
{
"title": "Embedding",
"title": "BGE M3 Output Embedding for Contexts",
"properties": {
"response": {
"type": "array",
Expand All @@ -74,6 +128,50 @@
"type": "number"
}
}
},
"shape": {
"type": "array",
"items": {
"type": "number"
}
},
"pooling": {
"type": "string",
"enum": [
"mean",
"cls"
],
"description": "The pooling method used in the embedding process."
}
}
},
{
"title": "BGE M3 Ouput Embedding",
"properties": {
"shape": {
"type": "array",
"items": {
"type": "number"
}
},
"data": {
"type": "array",
"description": "Embeddings of the requested text values",
"items": {
"type": "array",
"description": "Floating point embedding representation shaped by the embedding model",
"items": {
"type": "number"
}
}
},
"pooling": {
"type": "string",
"enum": [
"mean",
"cls"
],
"description": "The pooling method used in the embedding process."
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/content/workers-ai-models/bge-reranker-base.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
"name": "Text Classification",
"description": "Sentiment analysis or text classification is a common NLP task that classifies a text input into labels or classes."
},
"created_at": "2025-02-14 12:28:19.009",
"tags": [],
"properties": [],
"schema": {
Expand All @@ -21,7 +22,6 @@
},
"top_k": {
"type": "integer",
"default": null,
"minimum": 1,
"description": "Number of returned results starting with the best score."
},
Expand Down
11 changes: 9 additions & 2 deletions src/content/workers-ai-models/bge-small-en-v1.5.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,18 @@
"name": "Text Embeddings",
"description": "Feature extraction models transform raw data into numerical features that can be processed while preserving the information in the original dataset. These models are ideal as part of building vector search applications or Retrieval Augmented Generation workflows with Large Language Models (LLM)."
},
"created_at": "2023-11-07 15:43:58.042",
"tags": [],
"properties": [
{
"property_id": "beta",
"value": "false"
"property_id": "price",
"value": [
{
"unit": "per M input tokens",
"price": 0.02,
"currency": "USD"
}
]
},
{
"property_id": "info",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
"name": "Text Generation",
"description": "Family of generative text models, such as large language models (LLM), that can be adapted for a variety of natural language tasks."
},
"created_at": "2024-02-06 18:16:27.183",
"tags": [],
"properties": [
{
Expand Down Expand Up @@ -382,7 +383,6 @@
"oneOf": [
{
"type": "object",
"contentType": "application/json",
"properties": {
"response": {
"type": "string",
Expand Down Expand Up @@ -433,7 +433,6 @@
},
{
"type": "string",
"contentType": "text/event-stream",
"format": "binary"
}
]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
"name": "Text Generation",
"description": "Family of generative text models, such as large language models (LLM), that can be adapted for a variety of natural language tasks."
},
"created_at": "2024-02-06 18:18:27.462",
"tags": [],
"properties": [
{
Expand Down Expand Up @@ -382,7 +383,6 @@
"oneOf": [
{
"type": "object",
"contentType": "application/json",
"properties": {
"response": {
"type": "string",
Expand Down Expand Up @@ -433,7 +433,6 @@
},
{
"type": "string",
"contentType": "text/event-stream",
"format": "binary"
}
]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
"name": "Text Generation",
"description": "Family of generative text models, such as large language models (LLM), that can be adapted for a variety of natural language tasks."
},
"created_at": "2024-02-27 17:54:17.459",
"tags": [],
"properties": [
{
Expand Down Expand Up @@ -386,7 +387,6 @@
"oneOf": [
{
"type": "object",
"contentType": "application/json",
"properties": {
"response": {
"type": "string",
Expand Down Expand Up @@ -437,7 +437,6 @@
},
{
"type": "string",
"contentType": "text/event-stream",
"format": "binary"
}
]
Expand Down
Loading
Loading