Coder Social home page Coder Social logo

benjaminbossan / bitsandbytes Goto Github PK

View Code? Open in Web Editor NEW

This project forked from timdettmers/bitsandbytes

0.0 1.0 0.0 1.34 MB

Accessible large language models via k-bit quantization for PyTorch.

Home Page: https://huggingface.co/docs/bitsandbytes/main/en/index

License: MIT License

Shell 1.11% C++ 10.79% Python 61.47% C 0.07% Objective-C++ 0.18% Cuda 24.95% CMake 1.10% Metal 0.32%

bitsandbytes's Introduction

bitsandbytes

Downloads Downloads Downloads

The bitsandbytes library is a lightweight Python wrapper around CUDA custom functions, in particular 8-bit optimizers, matrix multiplication (LLM.int8()), and 8 & 4-bit quantization functions.

The library includes quantization primitives for 8-bit & 4-bit operations, through bitsandbytes.nn.Linear8bitLt and bitsandbytes.nn.Linear4bit and 8-bit optimizers through bitsandbytes.optim module.

There are ongoing efforts to support further hardware backends, i.e. Intel CPU + GPU, AMD GPU, Apple Silicon. Windows support is quite far along and is on its way as well.

Please head to the official documentation page:

https://huggingface.co/docs/bitsandbytes/main

ALPHA TESTERS WANTED: multi-backend-refactor AMD GPU + Intel CPU/GPU specific BNB backend implementations

We're in the process of a complex refactor in order to allow the support of additional hardware backends, other than CUDA, in BNB. The efforts around this are already quite far along and there's plenty of functionality already in place that is in need for users to take a hands-on approach! Mac support will likely soon also see progress. However, I recommend waiting 2 weeks until the device abstraction has further consolidated (breaking changes upcoming).

Currently, you still need to compile from source, after checking out the multi-backend-refactor branch (instructions WIP, but the current docs on the compilation from source are a good starting point; feel free to share tips / input in this Github discussion. We'll soon enable nightly releases to make this much easier for you!

Please give feedback to us in this dedicated Github Discussion space!

We're super excited about these recent developments and grateful for any constructive input or support that you can give to help us make this a reality. BNB is a community project and we're excited for your collaboration ๐Ÿค—

License

bitsandbytes is MIT licensed.

We thank Fabio Cannizzo for his work on FastBinarySearch which we use for CPU quantization.

bitsandbytes's People

Contributors

timdettmers avatar titus-von-koeller avatar justheuristic avatar akx avatar poedator avatar tomaarsen avatar mryab avatar lucidrains avatar younesbelkada avatar dbaranchuk avatar matthewdouglas avatar rickardp avatar dependabot[bot] avatar wkpark avatar stevhliu avatar rapsealk avatar rasbt avatar kashif avatar shademe avatar ihsanturk avatar dulalbert avatar blackhc avatar jph00 avatar jamezo97 avatar alexrs avatar sqrtminusone avatar mohammad-albarham avatar sunmarc avatar merveenoyan avatar michaelmior avatar

Watchers

 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.