Giter Site home page Giter Site logo

ct2hf's Introduction

ct2hf

python linting: pylint main.yml formatter.yml dependabot.yml

ct2hf is a user-friendly CLI tool designed to simplify the process of converting supported Hugging Face transformer models into a CTranslate2-compatible format. Additionally, it uploads the converted model to your Hugging Face repository. With ct2hf, you can avoid the hassle of manual conversions and the common issues of low memory, storage limitations, and permission errors.

Installation

You can install ct2hf via pip with the following.

pip install git+https://github.com/winstxnhdw/ct2hf

Then, you can uninstall ct2hf and all of its dependencies with the following.

pip uninstall ct2hf

Usage

By default, ct2hf avoids leaving behind any unnecessary files. If you would like to preserve the downloaded models, you can use the --preserve-models flag.

usage: ct2hf

convert and upload a transformer model to huggingface

positional arguments:
  model-id              transformer model to convert

options:
  --output-name         name of the output model
  --files-to-copy       files to copy to the output model
  --preserve-models     do not delete the downloaded models

Example

The minimal usage of ct2hf involves specifying the model ID of the transformer model you would like to convert.

ct2hf openchat/openchat-3.6-8b-20240522

You can also specify the name of the output model.

ct2hf openchat/openchat-3.6-8b-20240522 --output-name openchat-3.6-ct2-int8

You can also specify the files to copy to the output model.

ct2hf openchat/openchat-3.6-8b-20240522 --files-to-copy tokenizer.json tokenizer_config.json

ct2hf's People

Contributors

dependabot[bot] avatar winstxnhdw avatar

Watchers

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