{"id":16131929,"url":"https://github.com/uberi/robot-agent","last_synced_at":"2026-02-27T20:16:29.400Z","repository":{"id":181570635,"uuid":"666887149","full_name":"Uberi/robot-agent","owner":"Uberi","description":"Fine-tuned LLaMa2 13B model designed for ReAct-style and Tree-Of-Thoughts style prompting.","archived":false,"fork":false,"pushed_at":"2023-07-23T08:13:19.000Z","size":46,"stargazers_count":18,"open_issues_count":2,"forks_count":3,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-04-02T16:50:25.524Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Python","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/Uberi.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}},"created_at":"2023-07-15T23:20:55.000Z","updated_at":"2024-10-20T07:51:09.000Z","dependencies_parsed_at":"2024-10-27T18:20:38.309Z","dependency_job_id":"49cd7baa-6290-4018-84ae-ec4db9eaee89","html_url":"https://github.com/Uberi/robot-agent","commit_stats":null,"previous_names":["uberi/robot-agent"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Uberi/robot-agent","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Uberi%2Frobot-agent","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Uberi%2Frobot-agent/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Uberi%2Frobot-agent/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Uberi%2Frobot-agent/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Uberi","download_url":"https://codeload.github.com/Uberi/robot-agent/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Uberi%2Frobot-agent/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":276032951,"owners_count":25573468,"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-09-19T02:00:09.700Z","response_time":108,"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":"2024-10-09T22:28:23.907Z","updated_at":"2025-09-20T01:48:53.181Z","avatar_url":"https://github.com/Uberi.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"Robot Agent\n===========\n\nFine-tuned Llama2 13B model designed for ReAct-style and Tree-Of-Thoughts style prompting. The codebase has the following desirable features:\n\n* Entire training procedure runs out of the box on a single computer with 32GB of RAM and 24GB of VRAM (i.e. consumer-grade graphics cards such as the RTX 3090 and RTX 4090) with less than 30 hours of compute time.\n    * Carefully tuned to use no more than 27GiB of RAM and 23.6GiB of VRAM.\n    * This is accomplished through quantization, FP16, TF32, and the usual gradient accumulation/checkpointing settings.\n    * Training is fully interruptible/resumable.\n* Heavily commented, short, clean, and reproducible training code.\n    * All library dependency versions fully pinned, base models and datasets are pinned and downloaded as part of setup process.\n    * After initial setup, training process does not require network access - entire project folder is portable, can be moved into airgapped and offline environments.\n    * Use SafeTensors everywhere for speed and security.\n\nTechnical details:\n\n* Based on [Llama2 13B](https://huggingface.co/NousResearch/Llama-2-13b-hf).\n* QLoRA training, a 128 rank LoRA similar to [Guanaco](https://github.com/artidoro/qlora/blob/cc488110b5ea23594a418daca7085000a9420625/qlora.py#L324).\n* 2048-token context window used in supervised finetuning, 1536-token context window used in direct preference finetuning.\n* Supervised finetuning using [Airoboros' self-instruct dataset](https://huggingface.co/datasets/jondurbin/airoboros-gpt4-1.4.1), generated by [Airoboros' self-instruct implementation](https://github.com/jondurbin/airoboros).\n    * The dataset has been filtered for refusals, and so could be considered \"uncensored\".\n    * The dataset generation code also uses a GPT4 jailbreak to reduce the number of refusals in the first place.\n* Direct preference finetuning using [Anthropic's hh-rlhf dataset](https://huggingface.co/datasets/Anthropic/hh-rlhf)\n    * This replaces the reward modelling and reinforcement learning steps in a standard RLHF pipeline.\n* Codebase takes ideas and inspiration from [StackLLaMa](https://github.com/lvwerra/trl/tree/5c7bfbc8d9aeabee893290cc02121d7260636978/examples/research_projects/stack_llama/scripts), [QLoRA](https://github.com/artidoro/qlora), [LLaMA-TRL](https://github.com/jasonvanf/llama-trl), [Airoboros](https://github.com/jondurbin/airoboros), .\n\nRoadmap\n-------\n\n* [x] Full reproducible environment with all datasets, base models, and dependencies included.\n* [x] Supervised finetuning script using high-quality publically-available instruct datasets.\n* [x] Human-preference finetuning script based on Anthropic's hh-rlhf \"helpfulness\" dataset.\n* [x] Accidentally delete the training results on my GPU server and start the training over again from scratch.\n* [ ] Fiddle with agentic dataset generation using Charades dataset.\n* [ ] If that doesn't work, fiddle with video captioning using multimodal models like Otter to generate agentic captions from how-to videos on Youtube.\n\nPrompt Format\n-------------\n\n```\n### Human:\nINSTRUCTIONS_GO_HERE\n\n### Assistant:\n```\n\nNote that there is a single newline at the end of the prompt. Example:\n\n```\n### Human:\nWhat color is the sky?\n\n### Assistant:\nThe sky is blue.\n```\n\nTraining\n--------\n\nFirst, download everything that requires an internet connection into the current project folder. It will increase to around 30GiB in size:\n\n```sh\nmake download-datasets-and-models\n```\n\nNext, transfer the current project folder to the training machine, where the rest of the training can be performed fully offline:\n\n```sh\nmake train\n```\n\nInference\n---------\n\nTo use the model, a simple chat-like interface is included for demo purposes, it's not very fancy but it's good enough for testing purposes:\n\n```sh\nmake chat\n```\n\n### Using Llama.cpp\n\nFirst, run the following command to create `./exported-models/ggml-robot-agent-q5_K_M.bin`, an 8.6GiB GGML file compatible with Llama.cpp:\n\n```sh\nmake generate-ggml\n```\n\nNow to load the model using Llama.cpp:\n\n```sh\nmake chat-llama-cpp\n```\n\nTo use Llama.cpp manually, navigate to your llama.cpp folder and start using the model with the following command (replace `PATH_TO_PROJECT_FOLDER` with the path to the current project folder):\n\n```sh\n./main --model PATH_TO_PROJECT_FOLDER/exported-models/ggml-robot-agent-q5_K_M.bin --color --interactive --interactive-first --mirostat 2 --ctx-size 2048 --reverse-prompt $'\\n\\n### Human:\\n' --prompt $'\\n\\n### Human:\\n' --in-suffix $'\\n### Assistant:\\n'\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fuberi%2Frobot-agent","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fuberi%2Frobot-agent","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fuberi%2Frobot-agent/lists"}