{"id":31828369,"url":"https://github.com/unclecode/callama","last_synced_at":"2025-10-11T19:28:58.349Z","repository":{"id":236742472,"uuid":"793016735","full_name":"unclecode/callama","owner":"unclecode","description":"Democratizing Function Calling Capabilities for Open-Source Language Models","archived":false,"fork":false,"pushed_at":"2024-05-05T05:39:41.000Z","size":1959,"stargazers_count":41,"open_issues_count":1,"forks_count":6,"subscribers_count":4,"default_branch":"main","last_synced_at":"2025-10-06T10:57:48.411Z","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":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/unclecode.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":"2024-04-28T07:28:43.000Z","updated_at":"2025-07-23T04:29:49.000Z","dependencies_parsed_at":"2024-05-03T10:37:22.713Z","dependency_job_id":null,"html_url":"https://github.com/unclecode/callama","commit_stats":null,"previous_names":["unclecode/callama"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/unclecode/callama","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/unclecode%2Fcallama","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/unclecode%2Fcallama/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/unclecode%2Fcallama/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/unclecode%2Fcallama/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/unclecode","download_url":"https://codeload.github.com/unclecode/callama/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/unclecode%2Fcallama/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279008423,"owners_count":26084460,"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-10-11T02:00:06.511Z","response_time":55,"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":"2025-10-11T19:28:48.633Z","updated_at":"2025-10-11T19:28:58.344Z","avatar_url":"https://github.com/unclecode.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# 📞🦙 CaLLama: Hola \"Function\" are you there?\n\n![CaLLama](https://res.cloudinary.com/kidocode/image/upload/c_pad,w_300,h_300,ar_1:1/v1714302845/callama_3_ey59xu.png)\n\nThis repository is dedicated to advancing the \"function-call\" features for open-source large language models (LLMs). We believe that the future of AI, specifically AI agents, depends on proper function-calling capabilities. While proprietary models like OpenAI's have these features, it is crucial for the open-source community to have access to high-quality function-calling abilities to democratize AI.\n\nRecently, Facebook released LLaMA3, perhaps the best open-source LLM available. We have fine-tuned and created a version of LLaMA3 that natively supports function calls.\n\n## 🎯 Solutions\nWe are focusing on two directions:\n\n1. We are developing a cool library focused on function-call to build a uniform way of working with function calls (tool calls) for all LLMs. This library will be released in its first version soon.\n2. Fine-tuning small models specifically for function calling, which has already been done for Llama 3 and Tiny Llama.\n\n\n## Usage Methods 🛠️\n\n[![Model in HuggingFace](https://huggingface.co/datasets/huggingface/badges/resolve/main/model-on-hf-md.svg)](https://huggingface.co/unclecode)\n\n\n### 🖥️ Colab\n\n1. To know how to run using helper class, check this colab [![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/drive/1qyrNeAjURfWFAwEM0ozVEfRQeHUWK4Kq?usp=sharing)\n2. For a more detailed experience, check out the [![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://tinyurl.com/ucfllm)\n3. To use GGFU version, check out the [![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/drive/1EobHQ9fLkNvpWpXfegRUVDRpdd-Va5H_#scrollTo=rh3IlMxDduXw)\n\n### 🛠️ Usage Locally\n\nTo use the models in this repository, follow these steps:\n\n1. Clone the repository:\n```\ngit clone https://github.com/unclecode/fllm.git\n```\n\n2. Create a virtual environment and activate it:\n```\nconda create --name env python=3.10\nconda activate env\n```\n\n3. Install PyTorch if you haven't already:\n```\nconda install pytorch-cuda=\u003c12.1/11.8\u003e pytorch cudatoolkit xformers -c pytorch -c nvidia -c xformers\n```\n\n4. Install the required dependencies:\n```\npython setup.py\n```\n5. Add your HuggingFace token in \".env.text\", and then rename the file to \".env\".\n\n6. Run the example code in the `examples` folder to see the models in action.\n\nYou can also refer to the `callama.py` file in the `llms` folder to see the LLM chat template.\n\n### 🦙 Using the ollama\n\nSteps to run the example:\n\n1. Make sure Ollama is installed, and ollama server is running.\n2. Pull the model from the ollaama hub.\n\n```\nollama pull unclecode/llama3callama\nollama pull unclecode/tinycallama\n```\n\n3. Make sure to check the ollama example [here](https://github.com/unclecode/callama/blob/main/examples/ocallama.py)\n\n\nLink to models:\n- [llama3callama](https://ollama.com/unclecode/llama3callama)\n- [tinycallama](https://ollama.com/unclecode/tinycallama)\n\n\n## ✅ Features TODO List\n\n- [x] Single function detection\n- [x] Support for various model sizes and quantization levels\n- [x] Available as a LoRA adapter that can be merged with many models\n- [ ] Multi-function detection\n- [ ] Function binding, allowing the model to detect the order of execution and bind the output of one function to another\n- [ ] Fine-tuning models with less than 1B parameters for efficient function calling\n\n## 🤗 Models\n\nThe following models are available on Hugging Face:\n\n- 🦙 [unclecode/llama3-function-call-lora-adapter-240424](https://huggingface.co/unclecode/llama3-function-call-lora-adapter-240424)\n- 🦙 [unclecode/llama3-function-call-Q4_K_M_GGFU-240424](https://huggingface.co/unclecode/llama3-function-call-Q4_K_M_GGFU-240424)\n- 🦙 [unclecode/tinyllama-function-call-lora-adapter-250424](https://huggingface.co/unclecode/tinyllama-function-call-lora-adapter-250424)\n- 🦙 [unclecode/tinyllama-function-call-Q4_K_M_GGFU-250424](https://huggingface.co/unclecode/tinyllama-function-call-Q4_K_M_GGFU-250424)\n\n## 📊 Dataset\n\nThe models were fine-tuned using a modified version of the `ilacai/glaive-function-calling-v2-sharegpt` dataset, which can be found at [unclecode/glaive-function-calling-llama3](https://huggingface.co/datasets/unclecode/glaive-function-calling-llama3).\n\n## 🤝 Contributing\n\nWe welcome contributions from the community. If you are interested in joining this project or have any questions, please open an issue in this repository.\n\nTwitter (X): https://x.com/unclecode\n\n## 📜 License\n\nThese models are released under the Apache 2.0 license.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Funclecode%2Fcallama","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Funclecode%2Fcallama","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Funclecode%2Fcallama/lists"}