{"id":29140539,"url":"https://github.com/blocksense-network/blama","last_synced_at":"2025-10-25T17:20:19.711Z","repository":{"id":301080520,"uuid":"988916567","full_name":"blocksense-network/blama","owner":"blocksense-network","description":"AlpacaCore and llama.cpp based HTTP server for LLM inference","archived":false,"fork":false,"pushed_at":"2025-08-29T14:57:53.000Z","size":132,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-08-29T16:42:30.241Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/blocksense-network.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-05-23T09:16:34.000Z","updated_at":"2025-08-29T14:57:56.000Z","dependencies_parsed_at":"2025-06-25T04:11:33.755Z","dependency_job_id":"f498b891-0f3a-46bd-836a-7ee949cb47ef","html_url":"https://github.com/blocksense-network/blama","commit_stats":null,"previous_names":["blocksense-network/blama"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/blocksense-network/blama","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/blocksense-network%2Fblama","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/blocksense-network%2Fblama/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/blocksense-network%2Fblama/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/blocksense-network%2Fblama/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/blocksense-network","download_url":"https://codeload.github.com/blocksense-network/blama/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/blocksense-network%2Fblama/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":280989212,"owners_count":26425644,"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","status":"online","status_checked_at":"2025-10-25T02:00:06.499Z","response_time":81,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":[],"created_at":"2025-06-30T17:07:05.539Z","updated_at":"2025-10-25T17:20:19.658Z","avatar_url":"https://github.com/blocksense-network.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Blama - Blocksense Llama\n\nA wrapper around [llama.cpp](https://github.com/ggml-org/llama.cpp) that provides a server\nwith verifiable inference capabilities. Blama enables verifiable AI inference,\nensuring transparency and trust in model outputs.\n\n## Features\n\n- **High Performance**: Built on top of the optimized llama.cpp engine\n- **RESTful API**: Easy-to-use HTTP server interface\n- **Model Support**: Compatible with GGUF format models\n\n## Quick Start\n\n### Prerequisites\n\n- C++ compiler with C++17 support\n- CMake 3.14+\n- Git\n\n### Usage\n\n1. **Start the server:**\n```bash\n./blama-server path/to/your/model.gguf\n```\n\n2. **Make complete text requests:**\n```bash\ncurl -X POST http://localhost:7331/complete \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\n    \"prompt\": 'The first man to',\n    \"max_tokens\": 100\n  }'\n```\n\n3. **Verify completion results:**\n```bash\ncurl -X POST http://localhost:7331/verify_completion \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\n    \"request\": \u003cHere should be added the request to /complete\u003e,\n    \"response\": \u003cHere should be added the response from /complete\u003e\n  }'\n```\n\n## API Reference\n\nRead more in the document [here](docs/design/Server-API.md).\n\n## Verification System\n\nBlama implements a verification system that ensures the model predictions are correct\nbased on the output logits of each token generation.\n\n### How It Works\n\n1. Each inference request generates an array of token step generation results.\nEach token step has an array of logits (top 10) taken from the context.\n\n2. The same request + response then is send back for verification\n\n3. Each verification request will create the same model\nand fill the context with the response's token steps.\nDuring the context filling we'll produce again the same\ntoken steps but with the logits from the current context.\n\n4. Compare the the logits from the request and those returned during context filling.\nThe algorithm can be checked [here](inference/code/llama/LogitComparer.cpp)\n\n\n## Supported Models\n\n- Any GGUF-compatible model that is compatible with llama.cpp\n\n## Development\n\n### Building from Source\n\n```bash\n# List available presets\ncmake --list-presets\n\n# Configure with a preset\ncmake --preset debug\n\n# Build with a preset\ncmake --build --preset debug\n```\n\n## Acknowledgments\n\n- [llama.cpp](https://github.com/ggml-org/llama.cpp) for the high-performance inference engine\n- Meta AI for the Llama model architecture\n- The open source community for contributions and feedback\n\n## Support\n\n- **Issues**: [GitHub Issues](https://github.com/blocksense-network/blama/issues)\n\n---\n\n**Note**: This project is under active development. APIs may change between versions.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fblocksense-network%2Fblama","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fblocksense-network%2Fblama","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fblocksense-network%2Fblama/lists"}