Code Monkey home page Code Monkey logo

llama3.cp's Introduction

llama3.cp

llama3.cp is an adapted version of llama3.np (pure NumPy) that utilizes CuPy for GPU acceleration. The original implementation, written in pure NumPy, was created by likejazz.

Usage

python llama3_gpu.py "I have a dream"
"""
I have a dream. He dream of a big, beautiful garden full of flower and tree. He dream of playing with hi friend and eating yummy snack.
One day, he wa walking in the garden when he saw

Token count: 50, elapsed: 0.89s, 56 tokens/s
"""

On my machine, the original implementation performed as follows:

python llama3.py "I have a dream"
"""
I have a dream. He dream of a big, beautiful garden full of flower and tree. He dream of playing with hi friend and eating yummy snack.
One day, he wa walking in the garden when he saw

Token count: 50, elapsed: 2.08s, 24 tokens/s
"""

Relevant aspects

Changing from NumPy to CuPy, the performance is improved more than 2 times. Despite this, the performance can vary depending on the Hardware. The results presented here were achieved using an RTX 4090.

Installation

pip install -r requirements.txt

Observations

Depending on your CUDA version, you must modify the requirements.txt file to install the appropriate version of CuPy. For instance, if you use CUDA 11, you should change the line cupy-cuda12x to cupy-cuda11x.

License

MIT

llama3.cp's People

Contributors

likejazz avatar brunogeorgevich avatar

Stargazers

 avatar  avatar Morgan Schweers avatar  avatar  avatar  avatar Trad Do avatar  avatar Birdup avatar Abu-Zaher Faridee avatar  avatar Syahmi Azhar avatar Michael Moran avatar CoderBot avatar RossSong avatar Robert Haase avatar  avatar Kevin Raymond avatar SongInseo avatar Jay avatar  avatar Kenichi Maehashi avatar Billy Flare avatar Ivandir avatar MT avatar Ziv Lazarov avatar Nierto avatar  avatar Tejas Jain avatar Grant Robertson avatar  avatar Andrei Surugiu avatar Marko Vihoma avatar  avatar  avatar

Watchers

 avatar Nierto 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.