Giter Site home page Giter Site logo

rbitr / ferrite Goto Github PK

View Code? Open in Web Editor NEW
14.0 14.0 1.0 29 KB

Simple, lightweight transformers in Fortran

License: MIT License

Python 8.52% Fortran 90.37% Makefile 1.11%
embedding-models embeddings sentence-embeddings sentence-transformers transformer-models transformers

ferrite's People

Contributors

rbitr avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

henilp105

ferrite's Issues

Performance

Currently no performance optimizations have been included in the code. I started benchmarking the performance against HF transformers (which I think is the fair comparison for this project, and vs llama.cpp for the llama.f90 code *). Results (in /benchmark) show that on my computers it's slower with linux+openblas and faster with MacOS+accelerate, though Fortran starts up and loads the weights faster. We'll see how that changes with any optimizations.

Current potential changes:

  • stop using spread and add bias weights without copying
  • calling transpose repeatedly and unnecessarily in matmuls
  • compare speed of tokenization

@certik

* There is also this using GGML for embeddings but it's GPU focused https://bloop.ai/blog/gpu_with_ggml

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.