Coder Social home page Coder Social logo

salesforceairesearch / mobileaibench Goto Github PK

View Code? Open in Web Editor NEW
9.0 0.0 0.0 25.34 MB

License: Apache License 2.0

Makefile 0.38% Python 4.86% Swift 0.32% C++ 56.92% C 24.96% Objective-C 2.83% Metal 3.41% Objective-C++ 0.03% Shell 0.66% CMake 0.67% Kotlin 0.20% Nix 0.05% Cuda 4.68% Batchfile 0.01% JavaScript 0.01%

mobileaibench's Introduction

Python 3.10


MobileAIBench

A comprehensive benchmark designed to evaluate the performance and resource consumptions of LLMs & LMMs for on-device use cases.

Installation

To install MobileBench, follow these steps:

  1. Clone the Repository:
    git clone --recurse-submodules https://github.com/SalesforceAIResearch/MobileAIBench.git
  2. Create a Conda Environment:
    conda create -n mobile_bench python=3.10
    conda activate mobile_bench
  3. Run the Makefile:
    make
  4. Add OpenAI API Key:
    export OPENAI_API_KEY=<OPENAI_API_KEY>

Usage

Here are some usage examples for running MobileAIBench:

Task: Question Answering

  • Dataset: hotpot_qa & databricks-15k

  • Model: xgen2-3b.gguf

  • Run on GPU:

    python ./src/mobile_bench.py --task question_answering --model_lib llama_cpp_python --model_name xgen2-3b.gguf --use_gpu
  • Run on CPU:

    python ./src/mobile_bench.py --task question_answering --model_lib llama_cpp_python --model_name xgen2-3b.gguf

Task: All (Standard_NLP and Trust & Safety)

  • Model: xgen2-3b.gguf

  • Run on GPU:

    python ./src/mobile_bench.py --task all --model_lib llama_cpp_python --model_name xgen2-3b.gguf --use_gpu
  • Run on CPU:

    python ./src/mobile_bench.py --task all --model_lib llama_cpp_python --model_name xgen2-3b.gguf

Running Mobile App

  • To run ios mobile app, refer to ./ios-app/README.md
  • Here's a screenshot taken from the ios-app
- To run android mobile app, refer to ./android-app/README.md - Here's a screenshot taken from the android-app

mobileaibench's People

Contributors

ritheshrn avatar tulika214 avatar chrisjtan avatar

Stargazers

 avatar Egor Lynov avatar Hu Xiaolin avatar  avatar  avatar Jianguo Zhang avatar Liangwei Yang avatar Shelby Heinecke avatar  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.