{"id":19492664,"url":"https://github.com/agora-lab-ai/atom","last_synced_at":"2025-04-25T20:30:31.288Z","repository":{"id":193595784,"uuid":"689131907","full_name":"Agora-Lab-AI/Atom","owner":"Agora-Lab-AI","description":"a suite of finetuned LLMs for atomically precise function calling 🧪","archived":false,"fork":false,"pushed_at":"2024-10-07T04:22:28.000Z","size":2467,"stargazers_count":12,"open_issues_count":2,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-10-18T23:14:18.174Z","etag":null,"topics":["ai","artificial-intelligence","convolutional-neural-networks","function-calling","gpt-4","llama","llama2","llamacpp","ml","multi-modal","open-source","rpa","rpc","task-automation","tool-usage","transformer","workflow-automation"],"latest_commit_sha":null,"homepage":"https://discord.gg/GYbXvDGevY","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/Agora-Lab-AI.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","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},"funding":{"github":["kyegomez"],"patreon":null,"open_collective":null,"ko_fi":null,"tidelift":null,"community_bridge":null,"liberapay":null,"issuehunt":null,"otechie":null,"lfx_crowdfunding":null,"custom":null}},"created_at":"2023-09-08T22:11:15.000Z","updated_at":"2024-08-09T00:01:22.000Z","dependencies_parsed_at":null,"dependency_job_id":"9facc401-6e9f-49b1-8fd3-b8809a095491","html_url":"https://github.com/Agora-Lab-AI/Atom","commit_stats":{"total_commits":69,"total_committers":4,"mean_commits":17.25,"dds":0.1594202898550725,"last_synced_commit":"38f18fc9e3c93f09a65c57716691e6c980788b02"},"previous_names":["agora-x/atom"],"tags_count":0,"template":false,"template_full_name":"kyegomez/Python-Package-Template","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Agora-Lab-AI%2FAtom","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Agora-Lab-AI%2FAtom/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Agora-Lab-AI%2FAtom/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Agora-Lab-AI%2FAtom/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Agora-Lab-AI","download_url":"https://codeload.github.com/Agora-Lab-AI/Atom/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":224015648,"owners_count":17241535,"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":["ai","artificial-intelligence","convolutional-neural-networks","function-calling","gpt-4","llama","llama2","llamacpp","ml","multi-modal","open-source","rpa","rpc","task-automation","tool-usage","transformer","workflow-automation"],"created_at":"2024-11-10T21:22:29.450Z","updated_at":"2024-11-10T21:22:30.891Z","avatar_url":"https://github.com/Agora-Lab-AI.png","language":"Python","funding_links":["https://github.com/sponsors/kyegomez"],"categories":[],"sub_categories":[],"readme":"[![Multi-Modality](agorabanner.png)](https://discord.gg/qUtxnK2NMf)\n\n# Atom\na suite of finetuned LLMs for atomically precise function calling 🧪\n\n✅ Massive function calling dataset of over 20M samples.\n\n✅ First Model: Atom-Z-Tiny - Zephr trained on 100k samples\n\n✅ Vision function calling coming soon\n\n\n## Install\n\nYou can install the package using pip\n\n```bash\npip install atom-torch\n```\n\n## Usage\n```python\nimport torch\nfrom transformers import AutoTokenizer, AutoModelForCausalLM\n\ndevice = torch.device(\"cuda\" if torch.cuda.is_available() else \"cpu\")\n\ntokenizer = AutoTokenizer.from_pretrained(\"kye/Atom-Z-Tiny-7B\")\n\nmodel = AutoModelForCausalLM.from_pretrained(\n  \"kye/Atom-Z-Tiny-7B\", \n  trust_remote_code=True, \n).to(device)\n\ntask = \"\"\"\n\n\n[INST] \u003c\u003cSYS\u003e\u003e\n\u003cfunction\u003eAvailable functions:\n\u003cfunction\u003e{\n    \"name\": \"generate_password\",\n    \"description\": \"Generate a random password with specified criteria\",\n    \"parameters\": {\n        \"type\": \"object\",\n        \"properties\": {\n            \"length\": {\n                \"type\": \"integer\",\n                \"description\": \"The length of the password\"\n            },\n            \"include_numbers\": {\n                \"type\": \"boolean\",\n                \"description\": \"Include numbers in the password\"\n            },\n            \"include_special_characters\": {\n                \"type\": \"boolean\",\n                \"description\": \"Include special characters in the password\"\n            }\n        },\n        \"required\": [\n            \"length\"\n        ]\n    }\n}\n\u003c\u003c/SYS\u003e\u003e\n\nI need a new password. Can you generate one for me? [/INST]\n\n\n\"\"\"\n\ninput_ids = tokenizer.encode(task, return_tensors=\"pt\")\noutput = model.generate(input_ids.to(device), max_length=128, temperature=0.7).cpu()\noutput_text = tokenizer.decode(output[0], skip_special_tokens=True)\nprint(output_text)\n\n\n```\n\n### Training\n\n- To train the models, run `accelerate config` and enable DeepSpeed acceleration. `deepspeed/zero3.json` was the configuration file used for training.0\n- Then run accelerate launch `accelerate launch finetune.py`\n\n\nWe're finetuning this [model](https://huggingface.co/NousResearch/Yarn-Llama-2-13b-64k) on this [dataset](https://huggingface.co/datasets/kye/all-lucidrain-code-python-tokenized-65536-1)\n\n`sh./run.sh`\n\n- [Dataset](kye/all-lucidrain-code-python-tokenized-65536-1)\n\n### Citation\n\n```bibtex\n@misc{peng2023yarn,\n    title={YaRN: Efficient Context Window Extension of Large Language Models}, \n    author={Bowen Peng and Jeffrey Quesnelle and Honglu Fan and Enrico Shippole},\n    year={2023},\n    eprint={2309.00071},\n    archivePrefix={arXiv},\n    primaryClass={cs.CL}\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fagora-lab-ai%2Fatom","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fagora-lab-ai%2Fatom","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fagora-lab-ai%2Fatom/lists"}