{"id":17141069,"url":"https://github.com/zphang/lm_perplexity","last_synced_at":"2025-06-30T03:32:53.398Z","repository":{"id":116145769,"uuid":"312454610","full_name":"zphang/lm_perplexity","owner":"zphang","description":null,"archived":false,"fork":false,"pushed_at":"2020-12-21T10:06:15.000Z","size":24,"stargazers_count":0,"open_issues_count":0,"forks_count":1,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-01-29T13:43:36.961Z","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/zphang.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}},"created_at":"2020-11-13T02:43:05.000Z","updated_at":"2020-12-21T10:06:19.000Z","dependencies_parsed_at":null,"dependency_job_id":"8820debb-ce68-4075-89f4-6c0794550e5f","html_url":"https://github.com/zphang/lm_perplexity","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zphang%2Flm_perplexity","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zphang%2Flm_perplexity/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zphang%2Flm_perplexity/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zphang%2Flm_perplexity/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/zphang","download_url":"https://codeload.github.com/zphang/lm_perplexity/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245232916,"owners_count":20581703,"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":[],"created_at":"2024-10-14T20:24:15.694Z","updated_at":"2025-03-24T08:17:43.583Z","avatar_url":"https://github.com/zphang.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# lm_perplexity\n\n## Usage\n\nEvaluating on GPT-2 (uses GPU):\n\n```bash\npython lm_perplexity/run_lm_perplexity.py \\\n    --model_config_path preset_configs/gpt2_medium.json \\\n    --data_path /path/to/mydata.jsonl.zst\n```\n\nEvaluating on GPT-3 (requires OpenAI API key):\n\n```bash\nexport OPENAI_API_SECRET_KEY=YOUR_KEY_HERE\npython lm_perplexity/run_lm_perplexity.py \\\n    --model_config_path preset_configs/gpt3_curie.json \\\n    --data_path /path/to/mydata.jsonl.zst\n```\n\nAdditional Options:\n\n* `--max_docs n`: Only evaluate the first `n` docs. Use this for testing.\n* `--output_path /path/to/results.json`: Write results to JSON file.\n\n## Requirements\n\n* torch\n* transformers\n* openai\n* lm_dataformat\n* tqdm","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzphang%2Flm_perplexity","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fzphang%2Flm_perplexity","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzphang%2Flm_perplexity/lists"}