{"id":36958319,"url":"https://github.com/XMUDeepLIT/QGC","last_synced_at":"2026-01-20T16:01:10.649Z","repository":{"id":240179643,"uuid":"801888930","full_name":"XMUDeepLIT/QGC","owner":"XMUDeepLIT","description":"Code for \"Retaining Key Information under High Compression Rates: Query-Guided Compressor for LLMs\" (ACL 2024)","archived":false,"fork":false,"pushed_at":"2024-06-12T09:00:56.000Z","size":73,"stargazers_count":17,"open_issues_count":4,"forks_count":0,"subscribers_count":4,"default_branch":"main","last_synced_at":"2025-06-01T07:27:03.914Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","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/XMUDeepLIT.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}},"created_at":"2024-05-17T05:46:21.000Z","updated_at":"2025-03-03T02:44:55.000Z","dependencies_parsed_at":"2024-06-11T16:36:46.045Z","dependency_job_id":"72f16518-84ba-4444-8d3e-cdb278f5ebb4","html_url":"https://github.com/XMUDeepLIT/QGC","commit_stats":null,"previous_names":["deeplearnxmu/qgc","xmudeeplit/qgc"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/XMUDeepLIT/QGC","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/XMUDeepLIT%2FQGC","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/XMUDeepLIT%2FQGC/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/XMUDeepLIT%2FQGC/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/XMUDeepLIT%2FQGC/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/XMUDeepLIT","download_url":"https://codeload.github.com/XMUDeepLIT/QGC/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/XMUDeepLIT%2FQGC/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28606288,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-20T14:45:23.139Z","status":"ssl_error","status_checked_at":"2026-01-20T14:44:16.929Z","response_time":117,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":"2026-01-13T16:00:24.925Z","updated_at":"2026-01-20T16:01:10.640Z","avatar_url":"https://github.com/XMUDeepLIT.png","language":"Python","funding_links":[],"categories":["✂️ Compress Context"],"sub_categories":["RAG compression"],"readme":"# Query-Guided Compressor (QGC)\nCode for \"Retaining Key Information under High Compression Rates: Query-Guided Compressor for LLMs\" (ACL 2024)\n\n## Requirements\n\n```\ndatasets==2.15.0\nflash-attn==2.3.3\njsonlines==4.0.0\ntorch==2.0.0\ntorchvision==0.15.0\ntransformers==4.35.0\n```\n\n## Instructions\n\nWe use an example to show how to use our codes.\n\n### LLMs and Datasets\n\nWe use [LongChat-13B](https://huggingface.co/lmsys/longchat-13b-16k) as the target LLM, and use Llama-2-7B to initial the compressor parameters. For datasets, we use open-source QA datasets (NaturalQuestions, TrivialQA, HotpotQA) to train our compressor and evaluate it. All datasets can be downloaded from [this site](https://drive.google.com/drive/folders/1HhwPP6iZUBbAjWeWRkbEPtgXVIRZUz6V?usp=drive_link).\n\n### QGC Training and Inference\n\n```\n# train compressor\nbash train.sh\n\n# evaluate compressor\nbash infer.sh\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FXMUDeepLIT%2FQGC","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FXMUDeepLIT%2FQGC","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FXMUDeepLIT%2FQGC/lists"}