From 6b2f80974ae9c97b9a6a5ad6117fdf4d7ca3c5bc Mon Sep 17 00:00:00 2001 From: Ben Lower Date: Wed, 10 Apr 2024 14:48:18 -0700 Subject: [PATCH] initial version of website --- .astro/types.d.ts | 187 ++ .gitattributes | 1 + .github/workflows/astro.yml | 88 + .gitignore | 19 + .prettierignore | 1 + .prettierrc | 8 + README.md | 2 + astro.config.mjs | 38 + package.json | 33 + public/favicon.png | Bin 0 -> 646 bytes src/components/Footer.astro | 11 + src/components/Heading.astro | 9 + src/components/Hero.astro | 15 + src/components/MarkdownTable.astro | 81 + src/components/Navbar.astro | 62 + src/components/Section.astro | 7 + src/data/currentMetrics.md | 25 + src/data/data.csv | 20 + src/env.d.ts | 2 + src/layouts/Base.astro | 56 + src/pages/index.astro | 20 + src/utils/AppConfig.ts | 8 + tailwind.config.mjs | 28 + tsconfig.json | 46 + yarn.lock | 4330 ++++++++++++++++++++++++++++ 25 files changed, 5097 insertions(+) create mode 100644 .astro/types.d.ts create mode 100644 .gitattributes create mode 100644 .github/workflows/astro.yml create mode 100644 .gitignore create mode 100644 .prettierignore create mode 100644 .prettierrc create mode 100644 astro.config.mjs create mode 100644 package.json create mode 100644 public/favicon.png create mode 100644 src/components/Footer.astro create mode 100644 src/components/Heading.astro create mode 100644 src/components/Hero.astro create mode 100644 src/components/MarkdownTable.astro create mode 100644 src/components/Navbar.astro create mode 100644 src/components/Section.astro create mode 100644 src/data/currentMetrics.md create mode 100644 src/data/data.csv create mode 100644 src/env.d.ts create mode 100644 src/layouts/Base.astro create mode 100644 src/pages/index.astro create mode 100644 src/utils/AppConfig.ts create mode 100644 tailwind.config.mjs create mode 100644 tsconfig.json create mode 100644 yarn.lock diff --git a/.astro/types.d.ts b/.astro/types.d.ts new file mode 100644 index 0000000..8fb02dc --- /dev/null +++ b/.astro/types.d.ts @@ -0,0 +1,187 @@ +declare module 'astro:content' { + interface Render { + '.md': Promise<{ + Content: import('astro').MarkdownInstance<{}>['Content']; + headings: import('astro').MarkdownHeading[]; + remarkPluginFrontmatter: Record; + }>; + } +} + +declare module 'astro:content' { + export { z } from 'astro/zod'; + + type Flatten = T extends { [K: string]: infer U } ? U : never; + + export type CollectionKey = keyof AnyEntryMap; + export type CollectionEntry = Flatten; + + export type ContentCollectionKey = keyof ContentEntryMap; + export type DataCollectionKey = keyof DataEntryMap; + + // This needs to be in sync with ImageMetadata + export type ImageFunction = () => import('astro/zod').ZodObject<{ + src: import('astro/zod').ZodString; + width: import('astro/zod').ZodNumber; + height: import('astro/zod').ZodNumber; + format: import('astro/zod').ZodUnion< + [ + import('astro/zod').ZodLiteral<'png'>, + import('astro/zod').ZodLiteral<'jpg'>, + import('astro/zod').ZodLiteral<'jpeg'>, + import('astro/zod').ZodLiteral<'tiff'>, + import('astro/zod').ZodLiteral<'webp'>, + import('astro/zod').ZodLiteral<'gif'>, + import('astro/zod').ZodLiteral<'svg'>, + import('astro/zod').ZodLiteral<'avif'>, + ] + >; + }>; + + type BaseSchemaWithoutEffects = + | import('astro/zod').AnyZodObject + | import('astro/zod').ZodUnion<[BaseSchemaWithoutEffects, ...BaseSchemaWithoutEffects[]]> + | import('astro/zod').ZodDiscriminatedUnion + | import('astro/zod').ZodIntersection; + + type BaseSchema = + | BaseSchemaWithoutEffects + | import('astro/zod').ZodEffects; + + export type SchemaContext = { image: ImageFunction }; + + type DataCollectionConfig = { + type: 'data'; + schema?: S | ((context: SchemaContext) => S); + }; + + type ContentCollectionConfig = { + type?: 'content'; + schema?: S | ((context: SchemaContext) => S); + }; + + type CollectionConfig = ContentCollectionConfig | DataCollectionConfig; + + export function defineCollection( + input: CollectionConfig + ): CollectionConfig; + + type AllValuesOf = T extends any ? T[keyof T] : never; + type ValidContentEntrySlug = AllValuesOf< + ContentEntryMap[C] + >['slug']; + + export function getEntryBySlug< + C extends keyof ContentEntryMap, + E extends ValidContentEntrySlug | (string & {}), + >( + collection: C, + // Note that this has to accept a regular string too, for SSR + entrySlug: E + ): E extends ValidContentEntrySlug + ? Promise> + : Promise | undefined>; + + export function getDataEntryById( + collection: C, + entryId: E + ): Promise>; + + export function getCollection>( + collection: C, + filter?: (entry: CollectionEntry) => entry is E + ): Promise; + export function getCollection( + collection: C, + filter?: (entry: CollectionEntry) => unknown + ): Promise[]>; + + export function getEntry< + C extends keyof ContentEntryMap, + E extends ValidContentEntrySlug | (string & {}), + >(entry: { + collection: C; + slug: E; + }): E extends ValidContentEntrySlug + ? Promise> + : Promise | undefined>; + export function getEntry< + C extends keyof DataEntryMap, + E extends keyof DataEntryMap[C] | (string & {}), + >(entry: { + collection: C; + id: E; + }): E extends keyof DataEntryMap[C] + ? Promise + : Promise | undefined>; + export function getEntry< + C extends keyof ContentEntryMap, + E extends ValidContentEntrySlug | (string & {}), + >( + collection: C, + slug: E + ): E extends ValidContentEntrySlug + ? Promise> + : Promise | undefined>; + export function getEntry< + C extends keyof DataEntryMap, + E extends keyof DataEntryMap[C] | (string & {}), + >( + collection: C, + id: E + ): E extends keyof DataEntryMap[C] + ? Promise + : Promise | undefined>; + + /** Resolve an array of entry references from the same collection */ + export function getEntries( + entries: { + collection: C; + slug: ValidContentEntrySlug; + }[] + ): Promise[]>; + export function getEntries( + entries: { + collection: C; + id: keyof DataEntryMap[C]; + }[] + ): Promise[]>; + + export function reference( + collection: C + ): import('astro/zod').ZodEffects< + import('astro/zod').ZodString, + C extends keyof ContentEntryMap + ? { + collection: C; + slug: ValidContentEntrySlug; + } + : { + collection: C; + id: keyof DataEntryMap[C]; + } + >; + // Allow generic `string` to avoid excessive type errors in the config + // if `dev` is not running to update as you edit. + // Invalid collection names will be caught at build time. + export function reference( + collection: C + ): import('astro/zod').ZodEffects; + + type ReturnTypeOrOriginal = T extends (...args: any[]) => infer R ? R : T; + type InferEntrySchema = import('astro/zod').infer< + ReturnTypeOrOriginal['schema']> + >; + + type ContentEntryMap = { + + }; + + type DataEntryMap = { + + }; + + type AnyEntryMap = ContentEntryMap & DataEntryMap; + + type ContentConfig = never; +} diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..98f1671 --- /dev/null +++ b/.gitattributes @@ -0,0 +1 @@ +*xsl linguist-vendored \ No newline at end of file diff --git a/.github/workflows/astro.yml b/.github/workflows/astro.yml new file mode 100644 index 0000000..4f22ae1 --- /dev/null +++ b/.github/workflows/astro.yml @@ -0,0 +1,88 @@ +# Sample workflow for building and deploying an Astro site to GitHub Pages +# +# To get started with Astro see: https://docs.astro.build/en/getting-started/ +# +name: Deploy Astro site to Pages + +on: + # Runs on pushes targeting the default branch + push: + branches: ["main"] + + # Allows you to run this workflow manually from the Actions tab + workflow_dispatch: + +# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages +permissions: + contents: read + pages: write + id-token: write + +# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued. +# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete. +concurrency: + group: "pages" + cancel-in-progress: false + +env: + BUILD_PATH: "." # default value when not using subfolders + # BUILD_PATH: subfolder + +jobs: + build: + name: Build + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + - name: Detect package manager + id: detect-package-manager + run: | + if [ -f "${{ github.workspace }}/yarn.lock" ]; then + echo "manager=yarn" >> $GITHUB_OUTPUT + echo "command=install" >> $GITHUB_OUTPUT + echo "runner=yarn" >> $GITHUB_OUTPUT + exit 0 + elif [ -f "${{ github.workspace }}/package.json" ]; then + echo "manager=npm" >> $GITHUB_OUTPUT + echo "command=ci" >> $GITHUB_OUTPUT + echo "runner=npx --no-install" >> $GITHUB_OUTPUT + exit 0 + else + echo "Unable to determine package manager" + exit 1 + fi + - name: Setup Node + uses: actions/setup-node@v4 + with: + node-version: "20" + cache: ${{ steps.detect-package-manager.outputs.manager }} + cache-dependency-path: ${{ env.BUILD_PATH }}/yarn.lock + - name: Setup Pages + id: pages + uses: actions/configure-pages@v4 + - name: Install dependencies + run: ${{ steps.detect-package-manager.outputs.manager }} ${{ steps.detect-package-manager.outputs.command }} + working-directory: ${{ env.BUILD_PATH }} + - name: Build with Astro + run: | + ${{ steps.detect-package-manager.outputs.runner }} astro build \ + --site "${{ steps.pages.outputs.origin }}" \ + --base "${{ steps.pages.outputs.base_path }}" + working-directory: ${{ env.BUILD_PATH }} + - name: Upload artifact + uses: actions/upload-pages-artifact@v3 + with: + path: ${{ env.BUILD_PATH }}/dist + + deploy: + environment: + name: github-pages + url: ${{ steps.deployment.outputs.page_url }} + needs: build + runs-on: ubuntu-latest + name: Deploy + steps: + - name: Deploy to GitHub Pages + id: deployment + uses: actions/deploy-pages@v4 \ No newline at end of file diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..02f6e50 --- /dev/null +++ b/.gitignore @@ -0,0 +1,19 @@ +# build output +dist/ + +# dependencies +node_modules/ + +# logs +npm-debug.log* +yarn-debug.log* +yarn-error.log* +pnpm-debug.log* + + +# environment variables +.env +.env.production + +# macOS-specific files +.DS_Store diff --git a/.prettierignore b/.prettierignore new file mode 100644 index 0000000..394522f --- /dev/null +++ b/.prettierignore @@ -0,0 +1 @@ +node_modules/** \ No newline at end of file diff --git a/.prettierrc b/.prettierrc new file mode 100644 index 0000000..900c7ea --- /dev/null +++ b/.prettierrc @@ -0,0 +1,8 @@ +{ + "useTabs": true, + "singleQuote": true, + "trailingComma": "none", + "semi": true, + "printWidth": 100, + "plugins": ["prettier-plugin-astro", "prettier-plugin-tailwindcss"] +} diff --git a/README.md b/README.md index 000cc7d..d2bd468 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,4 @@ # fastest.ai Website with current metrics on the fastest AI models. + +Built using Astro and the https://github.com/nicdun/astro-tech-blog \ No newline at end of file diff --git a/astro.config.mjs b/astro.config.mjs new file mode 100644 index 0000000..dc26166 --- /dev/null +++ b/astro.config.mjs @@ -0,0 +1,38 @@ +import { defineConfig } from 'astro/config'; +import tailwind from '@astrojs/tailwind'; +import rehypePrettyCode from 'rehype-pretty-code'; +import react from '@astrojs/react'; +const options = { + // Specify the theme to use or a custom theme json, in our case + // it will be a moonlight-II theme from + // https://github.com/atomiks/moonlight-vscode-theme/blob/master/src/moonlight-ii.json + // Callbacks to customize the output of the nodes + //theme: json, + onVisitLine(node) { + // Prevent lines from collapsing in `display: grid` mode, and + // allow empty lines to be copy/pasted + if (node.children.length === 0) { + node.children = [{ + type: 'text', + value: ' ' + }]; + } + }, + onVisitHighlightedLine(node) { + // Adding a class to the highlighted line + node.properties.className = ['highlighted']; + } +}; + + +// https://astro.build/config +export default defineConfig({ + site: 'https://thefastest.ai', + markdown: { + syntaxHighlight: false, + // Disable syntax built-in syntax hightlighting from astro + rehypePlugins: [[rehypePrettyCode, options]], + }, + integrations: [tailwind(), react()], + output: 'static', +}); \ No newline at end of file diff --git a/package.json b/package.json new file mode 100644 index 0000000..d20a28f --- /dev/null +++ b/package.json @@ -0,0 +1,33 @@ +{ + "name": "fastest.ai", + "type": "module", + "version": "0.0.1", + "scripts": { + "dev": "astro dev", + "start": "astro dev", + "build": "astro check && astro build", + "preview": "astro preview", + "astro": "astro" + }, + "dependencies": { + "@astrojs/check": "^0.5.0", + "@astrojs/react": "^3.0.8", + "@astrojs/tailwind": "^5.0.4", + "@types/react": "^18.2.45", + "@types/react-dom": "^18.2.18", + "astro": "^4.0.7", + "canvas-confetti": "^1.9.2", + "mdast-util-to-string": "^4.0.0", + "react": "^18.2.0", + "react-dom": "^18.2.0", + "rehype-pretty-code": "^0.13.0", + "tailwindcss": "^3.4.0", + "typescript": "^5.3.3" + }, + "devDependencies": { + "@tailwindcss/typography": "^0.5.10", + "prettier": "^3.1.1", + "prettier-plugin-astro": "^0.13.0", + "prettier-plugin-tailwindcss": "^0.5.9" + } +} diff --git a/public/favicon.png b/public/favicon.png new file mode 100644 index 0000000000000000000000000000000000000000..b0c57e6b7e5b8fd97cc825a2a32d4cafadbec521 GIT binary patch literal 646 zcmV;10(t$3P)Px%KuJVFR9HvtmRm?uaU91#yJW7-8)eEAN1_#!T|g3LAoLIzMv*;;83kG3L#zmT ziLjUGp_hm#h=M3uAXJc1NTUrkTn{aVI=h&XX3oLP+{L>m&VnF1gYzFP5%zmNe7~Rn z_jloF0EuNRO$s2Dz=}^Gb9EY1vvUdWQNml0XEboT#>%B`FYeL6{{`5Zn?u{7J&Z@D z8Tt{Tx&1YhGl``joWO?c47!fgl50q(ZD5$5zywb|e!&}P@0oT--$ZKmwLv7oN>767Muqm0JCWgy-js2NK3r)2N?@TS(GHw z^*Zv62JF5;?sz{4wL%C$RxZxYz*?9`ZAlT9EE94I +
+ © {year.getFullYear()} - Fixie.ai +
+ diff --git a/src/components/Heading.astro b/src/components/Heading.astro new file mode 100644 index 0000000..7e97ea2 --- /dev/null +++ b/src/components/Heading.astro @@ -0,0 +1,9 @@ +--- +interface Props { + title: string; +} + +const { title } = Astro.props; +--- + +

{title}

diff --git a/src/components/Hero.astro b/src/components/Hero.astro new file mode 100644 index 0000000..d6339ee --- /dev/null +++ b/src/components/Hero.astro @@ -0,0 +1,15 @@ +--- +import Section from './Section.astro'; + +--- + +
+

Slow LLMs Suck

+
+

Apps are only as fast as their slowest component. LLMs vary tremendously on quality and speed. The table below shows the lastest performance metrics for many models and environments. We hope this data helps you choose the most performant model.

+
+

Have another model you want us to benchmark? Hit us up with an issue on GitHub.

+
+
+ + diff --git a/src/components/MarkdownTable.astro b/src/components/MarkdownTable.astro new file mode 100644 index 0000000..e910b05 --- /dev/null +++ b/src/components/MarkdownTable.astro @@ -0,0 +1,81 @@ +--- +import Section from './Section.astro'; +--- + +
+
+ +
+
+ + diff --git a/src/components/Navbar.astro b/src/components/Navbar.astro new file mode 100644 index 0000000..b8b6260 --- /dev/null +++ b/src/components/Navbar.astro @@ -0,0 +1,62 @@ +--- +import Section from './Section.astro'; +--- + +
+
+
Fastest.ai
+
+ +
+ + +
+
+
+
+ + diff --git a/src/components/Section.astro b/src/components/Section.astro new file mode 100644 index 0000000..62ae218 --- /dev/null +++ b/src/components/Section.astro @@ -0,0 +1,7 @@ +--- + +--- + +
+ +
diff --git a/src/data/currentMetrics.md b/src/data/currentMetrics.md new file mode 100644 index 0000000..606a631 --- /dev/null +++ b/src/data/currentMetrics.md @@ -0,0 +1,25 @@ +--- +date: '04/10/2024' +--- + +| Model | TTR | TTFT | TPS | Total | Tokens | +| :----- | --: | --: | --: | --: | ---: | +| gpt-4-turbo | 0.40 | 0.40 | 40 | 2.49 | 84 | +| gpt-4-0125-preview | 0.46 | 0.54 | 14 | 5.91 | 78 | +| gpt-4-1106-preview | 0.42 | 0.52 | 16 | 5.66 | 82 | +| fixie-westus.azure/gpt-4-1106-preview | 0.39 | 0.39 | 20 | 4.32 | 81 | +| fixie-openai-sub-with-gpt4.azure/gpt-4-1106-preview | 0.51 | 0.52 | 11 | 8.03 | 87 | +| gpt-3.5-turbo-0125 | 0.26 | 0.34 | 54 | 1.32 | 54 | +| gpt-3.5-turbo-1106 | 0.36 | 0.39 | 90 | 1.21 | 75 | +| fixie-westus.azure/gpt-3.5-turbo-1106 | 0.14 | 0.14 | 139 | 0.71 | 79 | +| fixie-openai-sub-with-gpt4.azure/gpt-3.5-turbo | 0.42 | 0.42 | 34 | 3.32 | 100 | +| claude-3-opus-20240229 | 1.05 | 1.05 | 18 | 4.09 | 55 | +| claude-3-sonnet-20240229 | 0.33 | 0.34 | 36 | 2.97 | 96 | +| claude-3-haiku-20240307 | 0.34 | 0.35 | 67 | 1.82 | 100 | +| claude-2.1 | 0.42 | 0.42 | 17 | 5.11 | 80 | +| claude-instant-1.2 | 0.46 | 0.46 | 76 | 1.74 | 98 | +| command-r-plus | 0.08 | 0.16 | 33 | 2.33 | 72 | +| command-r | 0.07 | 0.14 | 33 | 2.70 | 85 | +| command-light | 0.06 | 0.14 | 33 | 2.29 | 72 | +| gemini-pro | 0.47 | 0.70 | 255 | 1.08 | 100 | +| gemini-1.5-pro-preview-0409 | 1.18 | 1.59 | 114 | 1.97 | 45 | \ No newline at end of file diff --git a/src/data/data.csv b/src/data/data.csv new file mode 100644 index 0000000..bd84e8b --- /dev/null +++ b/src/data/data.csv @@ -0,0 +1,20 @@ +Date,Model,TTR,TTFT,TPS,Total,Tokens +04/10/2024,gpt-4-turbo,0.40,0.40,40,2.49,84 +04/10/2024,gpt-4-0125-preview,0.46,0.54,14,5.91,78 +04/10/2024,gpt-4-1106-preview,0.42,0.52,16,5.66,82 +04/10/2024,fixie-westus.azure/gpt-4-1106-preview,0.39,0.39,20,4.32,81 +04/10/2024,fixie-openai-sub-with-gpt4.azure/gpt-4-1106-preview,0.51,0.52,11,8.03,87 +04/10/2024,gpt-3.5-turbo-0125,0.26,0.34,54,1.32,54 +04/10/2024,gpt-3.5-turbo-1106,0.36,0.39,90,1.21,75 +04/10/2024,fixie-westus.azure/gpt-3.5-turbo-1106,0.14,0.14,139,0.71,79 +04/10/2024,fixie-openai-sub-with-gpt4.azure/gpt-3.5-turbo,0.42,0.42,34,3.32,100 +04/10/2024,claude-3-opus-20240229,1.05,1.05,18,4.09,55 +04/10/2024,claude-3-sonnet-20240229,0.33,0.34,36,2.97,96 +04/10/2024,claude-3-haiku-20240307,0.34,0.35,67,1.82,100 +04/10/2024,claude-2.1,0.42,0.42,17,5.11,80 +04/10/2024,claude-instant-1.2,0.46,0.46,76,1.74,98 +04/10/2024,command-r-plus,0.08,0.16,33,2.33,72 +04/10/2024,command-r,0.07,0.14,33,2.70,85 +04/10/2024,command-light,0.06,0.14,33,2.29,72 +04/10/2024,gemini-pro,0.47,0.70,255,1.08,100 +04/10/2024,gemini-1.5-pro-preview-0409,1.18,1.59,114,1.97,45 \ No newline at end of file diff --git a/src/env.d.ts b/src/env.d.ts new file mode 100644 index 0000000..acef35f --- /dev/null +++ b/src/env.d.ts @@ -0,0 +1,2 @@ +/// +/// diff --git a/src/layouts/Base.astro b/src/layouts/Base.astro new file mode 100644 index 0000000..a536f06 --- /dev/null +++ b/src/layouts/Base.astro @@ -0,0 +1,56 @@ +--- +import Footer from '@/components/Footer.astro'; +import Navbar from '@/components/Navbar.astro'; +import { AppConfig } from '@/utils/AppConfig'; + +export interface Props { + head: { + title: string; + description: string; + }; +} + +const { + head: { title, description } +} = Astro.props as Props; +--- + + + + + + {title} + + + + + + + + + +
+ +
+ +