{"id":50415511,"url":"https://github.com/mathemage/preference-model-initial-assessment","last_synced_at":"2026-05-31T05:31:08.489Z","repository":{"id":348600305,"uuid":"1171144078","full_name":"mathemage/preference-model-initial-assessment","owner":"mathemage","description":"solution for assessment at https://docs.google.com/forms/d/e/1FAIpQLSf4mqNST9kC6P41EDtaEYk65k0DptjuSyA_iRBoN10FwalSpw/viewform","archived":false,"fork":false,"pushed_at":"2026-04-01T21:51:16.000Z","size":38,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-04-02T09:25:56.422Z","etag":null,"topics":["evaluation-framework","large-language-models","llama","reinforcement-learning","trasnformers"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"agpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mathemage.png","metadata":{"files":{"readme":"README.md","changelog":null,"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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":"AGENTS.md","dco":null,"cla":null}},"created_at":"2026-03-02T23:15:16.000Z","updated_at":"2026-04-01T21:49:44.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/mathemage/preference-model-initial-assessment","commit_stats":null,"previous_names":["mathemage/preference-model-initial-assessment"],"tags_count":5,"template":false,"template_full_name":null,"purl":"pkg:github/mathemage/preference-model-initial-assessment","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mathemage%2Fpreference-model-initial-assessment","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mathemage%2Fpreference-model-initial-assessment/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mathemage%2Fpreference-model-initial-assessment/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mathemage%2Fpreference-model-initial-assessment/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mathemage","download_url":"https://codeload.github.com/mathemage/preference-model-initial-assessment/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mathemage%2Fpreference-model-initial-assessment/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33720897,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-05-31T02:00:06.040Z","response_time":95,"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":["evaluation-framework","large-language-models","llama","reinforcement-learning","trasnformers"],"created_at":"2026-05-31T05:31:08.341Z","updated_at":"2026-05-31T05:31:08.474Z","avatar_url":"https://github.com/mathemage.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Preference Model Initial Assessment\n\n[![Validation](https://github.com/mathemage/preference-model-initial-assessment/actions/workflows/validation.yml/badge.svg)](https://github.com/mathemage/preference-model-initial-assessment/actions/workflows/validation.yml)\n[![License: AGPL v3](https://img.shields.io/badge/License-AGPL%20v3-blue.svg)](https://choosealicense.com/licenses/agpl-3.0/)\n\nSolution for the [technical assessment](https://docs.google.com/forms/d/e/1FAIpQLSf4mqNST9kC6P41EDtaEYk65k0DptjuSyA_iRBoN10FwalSpw/viewform).\n\nAutomated validation runs on every push, pull request, and manual workflow run.\nIt executes the\nRL-style judge against `reference_solution/transformer_block.py` and runs\n`pytest tests/ -v` to confirm the environment and reference implementation work\nend to end.\n\n## Environment: Implement a Llama-Style Transformer Decoder Block from Scratch\n\nAn RL environment where the LLM agent must implement five core components of\nmodern transformer architectures — **RMSNorm**, **Rotary Position Embeddings\n(RoPE)**, **Grouped-Query Attention (GQA)**, **SwiGLU**, and a complete\n**LlamaBlock** — entirely from scratch in PyTorch.\n\n### Repository Structure\n\n```\n├── assessment_answers.md              # Full assessment answers\n├── environment/\n│   ├── prompt.md                      # Exact prompt given to the LLM agent\n│   ├── judge.py                       # Automated judge (continuous score 0–1)\n│   └── setup.sh                       # VM setup script\n├── reference_solution/\n│   └── transformer_block.py           # Working reference implementation\n├── tests/\n│   └── test_judge.py                  # Tests for the judge + reference solution\n└── requirements.txt                   # Python dependencies\n```\n\n### Quick Start\n\n```bash\npip install -r requirements.txt\n\n# Run the judge against the reference solution\npython environment/judge.py --solution reference_solution/transformer_block.py\n\n# Run tests\npytest tests/ -v\n```\n\n### Assessment Answers\n\nSee [assessment_answers.md](assessment_answers.md) for detailed answers to all\nassessment questions.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmathemage%2Fpreference-model-initial-assessment","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmathemage%2Fpreference-model-initial-assessment","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmathemage%2Fpreference-model-initial-assessment/lists"}