nexa-gguf


Namenexa-gguf JSON
Version 0.11.0 PyPI version JSON
download
home_pagehttps://nexa.ai
SummaryRead and write ML models in GGUF for GGML
upload_time2024-11-11 19:06:41
maintainerNone
docs_urlNone
authorNexa AI
requires_python>=3.8
licenseNone
keywords nexa nexaai ggml gguf llama.cpp
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # Nexa GGUF Convertor

Depends on [llama.cpp](https://github.com/ggerganov/llama.cpp) commit [11ac980](https://github.com/ggerganov/llama.cpp/commit/11ac9800aff532715a5bc7991062c68ba3472e6e)

## Below is the original README.md from llama.cpp

## gguf

This is a Python package for writing binary files in the [GGUF](https://github.com/ggerganov/ggml/pull/302)
(GGML Universal File) format.

See [convert_hf_to_gguf.py](https://github.com/ggerganov/llama.cpp/blob/master/convert_hf_to_gguf.py)
as an example for its usage.

## Installation

```sh
pip install gguf
```

## API Examples/Simple Tools

[examples/writer.py](https://github.com/ggerganov/llama.cpp/blob/master/gguf-py/examples/writer.py) — Generates `example.gguf` in the current directory to demonstrate generating a GGUF file. Note that this file cannot be used as a model.

[scripts/gguf_dump.py](https://github.com/ggerganov/llama.cpp/blob/master/gguf-py/scripts/gguf_dump.py) — Dumps a GGUF file's metadata to the console.

[scripts/gguf_set_metadata.py](https://github.com/ggerganov/llama.cpp/blob/master/gguf-py/scripts/gguf_set_metadata.py) — Allows changing simple metadata values in a GGUF file by key.

[scripts/gguf_convert_endian.py](https://github.com/ggerganov/llama.cpp/blob/master/gguf-py/scripts/gguf_convert_endian.py) — Allows converting the endianness of GGUF files.

[scripts/gguf_new_metadata.py](https://github.com/ggerganov/llama.cpp/blob/master/gguf-py/scripts/gguf_new_metadata.py) — Copies a GGUF file with added/modified/removed metadata values.

## Development

Maintainers who participate in development of this package are advised to install it in editable mode:

```sh
cd /path/to/llama.cpp/gguf-py

pip install --editable .
```

**Note**: This may require to upgrade your Pip installation, with a message saying that editable installation currently requires `setup.py`.
In this case, upgrade Pip to the latest:

```sh
pip install --upgrade pip
```

## Automatic publishing with CI

There's a GitHub workflow to make a release automatically upon creation of tags in a specified format.

1. Bump the version in `pyproject.toml`.
2. Create a tag named `gguf-vx.x.x` where `x.x.x` is the semantic version number.

```sh
git tag -a gguf-v1.0.0 -m "Version 1.0 release"
```

3. Push the tags.

```sh
git push origin --tags
```

## Manual publishing

If you want to publish the package manually for any reason, you need to have `twine` and `build` installed:

```sh
pip install build twine
```

Then, follow these steps to release a new version:

1. Bump the version in `pyproject.toml`.
2. Build the package:

```sh
python -m build
```

3. Upload the generated distribution archives:

```sh
python -m twine upload dist/*
```

## Run Unit Tests

From root of this repository you can run this command to run all the unit tests

```bash
python -m unittest discover ./gguf-py -v
```

## TODO

- [ ] Include conversion scripts as command line entry points in this package.


            

Raw data

            {
    "_id": null,
    "home_page": "https://nexa.ai",
    "name": "nexa-gguf",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.8",
    "maintainer_email": null,
    "keywords": "nexa, nexaai, ggml, gguf, llama.cpp",
    "author": "Nexa AI",
    "author_email": "octopus@nexa4ai.com",
    "download_url": "https://files.pythonhosted.org/packages/5a/f5/3196ea4ae90782868b491b0e7d8862c653df84c8b9a2f239f38fc95a067a/nexa_gguf-0.11.0.tar.gz",
    "platform": null,
    "description": "# Nexa GGUF Convertor\n\nDepends on [llama.cpp](https://github.com/ggerganov/llama.cpp) commit [11ac980](https://github.com/ggerganov/llama.cpp/commit/11ac9800aff532715a5bc7991062c68ba3472e6e)\n\n## Below is the original README.md from llama.cpp\n\n## gguf\n\nThis is a Python package for writing binary files in the [GGUF](https://github.com/ggerganov/ggml/pull/302)\n(GGML Universal File) format.\n\nSee [convert_hf_to_gguf.py](https://github.com/ggerganov/llama.cpp/blob/master/convert_hf_to_gguf.py)\nas an example for its usage.\n\n## Installation\n\n```sh\npip install gguf\n```\n\n## API Examples/Simple Tools\n\n[examples/writer.py](https://github.com/ggerganov/llama.cpp/blob/master/gguf-py/examples/writer.py) \u2014 Generates `example.gguf` in the current directory to demonstrate generating a GGUF file. Note that this file cannot be used as a model.\n\n[scripts/gguf_dump.py](https://github.com/ggerganov/llama.cpp/blob/master/gguf-py/scripts/gguf_dump.py) \u2014 Dumps a GGUF file's metadata to the console.\n\n[scripts/gguf_set_metadata.py](https://github.com/ggerganov/llama.cpp/blob/master/gguf-py/scripts/gguf_set_metadata.py) \u2014 Allows changing simple metadata values in a GGUF file by key.\n\n[scripts/gguf_convert_endian.py](https://github.com/ggerganov/llama.cpp/blob/master/gguf-py/scripts/gguf_convert_endian.py) \u2014 Allows converting the endianness of GGUF files.\n\n[scripts/gguf_new_metadata.py](https://github.com/ggerganov/llama.cpp/blob/master/gguf-py/scripts/gguf_new_metadata.py) \u2014 Copies a GGUF file with added/modified/removed metadata values.\n\n## Development\n\nMaintainers who participate in development of this package are advised to install it in editable mode:\n\n```sh\ncd /path/to/llama.cpp/gguf-py\n\npip install --editable .\n```\n\n**Note**: This may require to upgrade your Pip installation, with a message saying that editable installation currently requires `setup.py`.\nIn this case, upgrade Pip to the latest:\n\n```sh\npip install --upgrade pip\n```\n\n## Automatic publishing with CI\n\nThere's a GitHub workflow to make a release automatically upon creation of tags in a specified format.\n\n1. Bump the version in `pyproject.toml`.\n2. Create a tag named `gguf-vx.x.x` where `x.x.x` is the semantic version number.\n\n```sh\ngit tag -a gguf-v1.0.0 -m \"Version 1.0 release\"\n```\n\n3. Push the tags.\n\n```sh\ngit push origin --tags\n```\n\n## Manual publishing\n\nIf you want to publish the package manually for any reason, you need to have `twine` and `build` installed:\n\n```sh\npip install build twine\n```\n\nThen, follow these steps to release a new version:\n\n1. Bump the version in `pyproject.toml`.\n2. Build the package:\n\n```sh\npython -m build\n```\n\n3. Upload the generated distribution archives:\n\n```sh\npython -m twine upload dist/*\n```\n\n## Run Unit Tests\n\nFrom root of this repository you can run this command to run all the unit tests\n\n```bash\npython -m unittest discover ./gguf-py -v\n```\n\n## TODO\n\n- [ ] Include conversion scripts as command line entry points in this package.\n\n",
    "bugtrack_url": null,
    "license": null,
    "summary": "Read and write ML models in GGUF for GGML",
    "version": "0.11.0",
    "project_urls": {
        "Homepage": "https://nexa.ai",
        "Repository": "https://github.com/NexaAI/nexa-gguf-convertor"
    },
    "split_keywords": [
        "nexa",
        " nexaai",
        " ggml",
        " gguf",
        " llama.cpp"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "5af53196ea4ae90782868b491b0e7d8862c653df84c8b9a2f239f38fc95a067a",
                "md5": "d65beeff277d989e114733b836edafb1",
                "sha256": "f1c00b7dde0086fe234ffdc7f9c06132029b233118d9f61729a8d4a5a021a083"
            },
            "downloads": -1,
            "filename": "nexa_gguf-0.11.0.tar.gz",
            "has_sig": false,
            "md5_digest": "d65beeff277d989e114733b836edafb1",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.8",
            "size": 115654,
            "upload_time": "2024-11-11T19:06:41",
            "upload_time_iso_8601": "2024-11-11T19:06:41.170261Z",
            "url": "https://files.pythonhosted.org/packages/5a/f5/3196ea4ae90782868b491b0e7d8862c653df84c8b9a2f239f38fc95a067a/nexa_gguf-0.11.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-11-11 19:06:41",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "NexaAI",
    "github_project": "nexa-gguf-convertor",
    "github_not_found": true,
    "lcname": "nexa-gguf"
}
        
Elapsed time: 0.35867s