{"id":15175665,"url":"https://github.com/zackshen/gguf","last_synced_at":"2026-02-16T05:11:06.935Z","repository":{"id":215398402,"uuid":"738826721","full_name":"zackshen/gguf","owner":"zackshen","description":"a GGUF file parser ","archived":false,"fork":false,"pushed_at":"2024-02-08T05:49:42.000Z","size":49,"stargazers_count":9,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-24T10:03:37.268Z","etag":null,"topics":["ai","ggml","gguf","gpt","llama","llm","model"],"latest_commit_sha":null,"homepage":"https://github.com/zackshen/gguf","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/zackshen.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-01-04T06:14:33.000Z","updated_at":"2025-02-04T21:50:37.000Z","dependencies_parsed_at":"2024-08-25T04:00:36.672Z","dependency_job_id":null,"html_url":"https://github.com/zackshen/gguf","commit_stats":{"total_commits":26,"total_committers":2,"mean_commits":13.0,"dds":"0.038461538461538436","last_synced_commit":"fe396a9536fbbd7388a28ff4d94be62ba78f1797"},"previous_names":["zackshen/gguf"],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zackshen%2Fgguf","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zackshen%2Fgguf/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zackshen%2Fgguf/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zackshen%2Fgguf/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/zackshen","download_url":"https://codeload.github.com/zackshen/gguf/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241645306,"owners_count":19996362,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ai","ggml","gguf","gpt","llama","llm","model"],"created_at":"2024-09-27T12:39:51.295Z","updated_at":"2026-02-16T05:11:06.930Z","avatar_url":"https://github.com/zackshen.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# GGUF-RS\n\n[![Crates.io](https://img.shields.io/crates/v/gguf-rs.svg)](https://crates.io/crates/gguf-rs)\n[![Documentation](https://docs.rs/gguf-rs/badge.svg)](https://docs.rs/gguf-rs)\n[![License](https://img.shields.io/crates/l/gguf-rs.svg)](https://github.com/zackshen/gguf/blob/main/LICENSE)\n![Unit test](https://github.com/zackshen/gguf/actions/workflows/test.yml/badge.svg)\n![Publish](https://github.com/zackshen/gguf/actions/workflows/publish.yml/badge.svg)\n\nA Rust library for parsing and reading GGUF (GGML Universal Format) files. GGUF files are binary files that contain key-value metadata and tensors, commonly used for storing quantized machine learning models.\n\n## Features\n\n- ✅ Decode GGUF files (v1, v2, v3)\n- ✅ Access key-value metadata\n- ✅ Access tensor information\n- ✅ Support for little-endian and big-endian files\n- ✅ CLI tool for quick inspection\n- ✅ Zero-copy metadata access\n\n## Installation\n\nAdd to your `Cargo.toml`:\n\n```toml\n[dependencies]\ngguf-rs = \"0.1\"\n```\n\nOr install the CLI tool:\n\n```bash\ncargo install gguf-rs\n```\n\n## Usage\n\n### Library\n\n```rust\nuse gguf_rs::get_gguf_container;\n\nfn main() -\u003e Result\u003c(), Box\u003cdyn std::error::Error\u003e\u003e {\n    // Open a GGUF file\n    let mut container = get_gguf_container(\"model.gguf\")?;\n    let model = container.decode()?;\n\n    // Print model info\n    println!(\"GGUF version: {}\", model.get_version());\n    println!(\"Architecture: {}\", model.model_family());\n    println!(\"Parameters: {}\", model.model_parameters());\n    println!(\"File type: {}\", model.file_type());\n    println!(\"Number of tensors: {}\", model.num_tensor());\n\n    // Access metadata\n    for (key, value) in model.kv() {\n        println!(\"{}: {:?}\", key, value);\n    }\n\n    // List tensors\n    for tensor in model.tensors() {\n        println!(\"Tensor: {} (shape: {:?})\", tensor.name, tensor.shape);\n    }\n\n    Ok(())\n}\n```\n\n### CLI\n\nShow model metadata:\n\n```bash\ngguf path_to_your_model.gguf\n```\n\nShow tensors:\n\n```bash\ngguf path_to_your_model.gguf --tensors\n```\n\n## Supported GGML Types\n\n| Type | Description |\n|------|-------------|\n| F32 | 32-bit float |\n| F16 | 16-bit float |\n| Q4_0 | 4-bit quantization (type 0) |\n| Q4_1 | 4-bit quantization (type 1) |\n| Q5_0 | 5-bit quantization (type 0) |\n| Q5_1 | 5-bit quantization (type 1) |\n| Q8_0 | 8-bit quantization (type 0) |\n| Q2_K - Q6_K | K-quant types |\n| IQ series | I-quant types (IQ1_S, IQ2_XXS, etc.) |\n| BF16 | Brain float 16 |\n\n## API Documentation\n\nFull API documentation is available at [docs.rs/gguf-rs](https://docs.rs/gguf-rs).\n\n## Testing\n\n```bash\ncargo test\n```\n\n## Contributing\n\nContributions are welcome! Please see [CONTRIBUTING.md](CONTRIBUTING.md) for guidelines.\n\n1. Fork the repository\n2. Create a feature branch\n3. Make your changes\n4. Run tests and clippy\n5. Submit a pull request\n\n## Security\n\nPlease report security vulnerabilities to zackshen0526@gmail.com. See [SECURITY.md](SECURITY.md) for more information.\n\n## GGUF Specification\n\nThis library implements the [GGUF specification](https://github.com/ggerganov/ggml/blob/master/docs/gguf.md).\n\n## License\n\nMIT License - see [LICENSE](LICENSE) for details.\n\n## Credits\n\n- GGUF format by [ggml](https://github.com/ggerganov/ggml)\n- Contributors: [@AvivAbachi](https://github.com/AvivAbachi), [@jbooth](https://github.com/jbooth), [@Knight-Ops](https://github.com/Knight-Ops)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzackshen%2Fgguf","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fzackshen%2Fgguf","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzackshen%2Fgguf/lists"}