GithubHelp home page GithubHelp logo

vrmars3d / ai-benchmarks Goto Github PK

View Code? Open in Web Editor NEW

This project forked from fixie-ai/ai-benchmarks

0.0 0.0 0.0 62 KB

Benchmarking suite for popular AI APIs

License: MIT License

Python 100.00%

ai-benchmarks's Introduction

ai-benchmarks

This repo contains a handful of utilities for benchmarking the response latency of popular AI services, including:

Large Language Models (LLMs):

  • OpenAI (chat and embedding models)
  • Anthropic (chat models)

Text-to-Speech Models (TTS):

  • ElevenLabs
  • PlayHT

Initial setup

pip install -r requirements.txt

Running benchmarks

To run a benchmark, first set the appropriate environment variable (e.g., OPENAI_API_KEY, ELEVEN_API_KEY) etc, and then run the appropriate benchmark script, e.g.,

python llm_benchmark.py -m gpt-3.5-turbo "Write me a haiku."

or

python elevenlabs_stream_benchmark.py "Haikus I find tricky, With a 5-7-5 count, But I'll give it a go"

Playing audio

First, install mpv via

brew install mpv

Then, just pass the -p argument when generating text, e.g.,

python playht_benchmark.py -p "Well, basically I have intuition."

You can use the -v parameter to select which voice to use for generation.

ai-benchmarks's People

Contributors

juberti avatar nn1985 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.