Skip to main content

A patch to enable llama.cpp as acceleration backend on windows platform

Project description

patchs_unsloth_llamacpp

Overview

patchs_unsloth_llamacpp is a tool designed to accelerate model inference on the Windows platform using llama.cpp as its backend.

Features

  • Accelerates model inference by llama.cpp.
  • Compatible with Windows operating system.
  • If RAM is not enough, also support move data to VRAM ( this may consume more VRAM ).
  • Only Support GRPOTrainer now.

Usage Example

To use patchs_unsloth_llamacpp, follow these steps:

  1. Install the python package:

    python3 -m pip install patchs_unsloth_llamacpp
    
  2. Add code below in you project:

    # use code below before import unsloth and unsloth-zoo
    from patchs_unsloth_llamacpp import patch
    patch("GRPO")
    
  3. Run your project:

    python3 your_project.py
    
  4. If RAM is OOM when training, add these code below to move data to VRAM instead.

    from patchs_unsloth_llamacpp import unsloth_cpu_oom_patch
    unsloth_cpu_oom_patch(True)
    

Known Issues

1. First Run Error

On the initial run, you might encounter an error stating "AttributeError: 'NoneType' object has no attribute 'span'". Simply running the application again should resolve this issue.

2. GGUF Error

As llama.cpp has it own gguf format to save models, this package has its own gguf python package, which may conflicts with other gguf packages installed in the system. If this happens, please uninstall or update guff package installed.

Contact Author

For questions or contributions, please contact the author at liuzhi1999@foxmail.com.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

patchs_unsloth_llamacpp-0.0.2.tar.gz (202.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

patchs_unsloth_llamacpp-0.0.2-py3-none-any.whl (211.6 kB view details)

Uploaded Python 3

File details

Details for the file patchs_unsloth_llamacpp-0.0.2.tar.gz.

File metadata

  • Download URL: patchs_unsloth_llamacpp-0.0.2.tar.gz
  • Upload date:
  • Size: 202.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.11.8

File hashes

Hashes for patchs_unsloth_llamacpp-0.0.2.tar.gz
Algorithm Hash digest
SHA256 979cfb52264995985f9db95879064eb95dacb01b9d687e81dac8d22e62c8ea50
MD5 27c09bf654d05f513424ae5dfd60262c
BLAKE2b-256 d700f7906b2bed80021b1fe112e19b31fbc8acbadfa59a6c1fc204301c603133

See more details on using hashes here.

File details

Details for the file patchs_unsloth_llamacpp-0.0.2-py3-none-any.whl.

File metadata

File hashes

Hashes for patchs_unsloth_llamacpp-0.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 4f04dba8ef4bf745fbfcf2ea8a8f814917e0a635801a2680e1a73d77190dc436
MD5 3b1aadda49eb8bb399a331402c7715da
BLAKE2b-256 c01c944c027a65295b324f6cbe8fe4c8e0654151105f971668615e5024641688

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page