Code Monkey home page Code Monkey logo

Comments (6)

NeonBohdan avatar NeonBohdan commented on September 27, 2024 1

Thanks it's working
Is it possible to provide aarch64 pypi package with prebuild libctransformers.so for convenience?

from ctransformers.

marella avatar marella commented on September 27, 2024 1

I'm using GitHub Actions to build binaries but it doesn't support ARM processors currently.
I made it simpler to install from source now. You can just run the following command:

pip install ctransformers --no-binary ctransformers

from ctransformers.

marella avatar marella commented on September 27, 2024

Hi, for ARM processors it has to be built from source as precompiled libs are not available #9 (comment):

git clone --recurse-submodules https://github.com/marella/ctransformers
cd ctransformers
./scripts/build.sh

The compiled binary will be located at build/lib/libctransformers.so which can be used as:

llm = AutoModelForCausalLM.from_pretrained(..., lib='/path/to/ctransformers/build/lib/libctransformers.so')

from ctransformers.

myNicole98 avatar myNicole98 commented on September 27, 2024

It worked! Thanks for the help ^^

from ctransformers.

NeonBohdan avatar NeonBohdan commented on September 27, 2024

@marella thanks
As I saw it's for example possible with qemu here https://github.com/OpenNMT/CTranslate2/blob/50ce6a76920e8eef15a47997353101348871ec3d/.github/workflows/ci.yml#L163

from ctransformers.

rvandernoort avatar rvandernoort commented on September 27, 2024

Hi, just stumbled on this thread trying to get ctransformers to work on an RPi4. Quick notes:

  • Firstly, a deprecation warning
pip install ctransformers --no-binary ctransformers
DEPRECATION: --no-binary currently disables reading from the cache of locally built wheels. In the future --no-binary will not influence the wheel cache. pip 23.1 will enforce this behaviour change. A possible replacement is to use the --no-cache-dir option. You can use the flag --use-feature=no-binary-enable-wheel-cache to test the upcoming behaviour. Discussion can be found at https://github.com/pypa/pip/issues/11453
  • Secondly, this installation method results in a unicode error for me:
print(llm(formatted_prompt))
UnicodeEncodeError: 'latin-1' codec can't encode character '\u2019' in position 49: ordinal not in range(256)
  • Lastly, manual installation from source work perfectly, however might it be a good idea to put this in the installation part of the readme, since I had to find it in a closed issue.

Overall love the library! 👍

from ctransformers.

Related Issues (20)

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.