{"data":{"slug":"ise-uiuc-magicoder","name":"magicoder","tagline":"[ICML'24] Magicoder: Empowering Code Generation with OSS-Instruct","github_url":"https://github.com/ise-uiuc/magicoder","owner":"ise-uiuc","repo":"magicoder","owner_avatar_url":"https://avatars.githubusercontent.com/u/92598497?v=4","primary_language":"Python","stars":2096,"forks":171,"topics":["ai4code","large-language-models","llm","llm4code"],"archived":false,"github_pushed_at":"2024-11-01T17:28:52+00:00","maintenance_label":"Dormant","url":"https://www.graphcanon.com/tools/ise-uiuc-magicoder","markdown_url":"https://www.graphcanon.com/tools/ise-uiuc-magicoder.md","api_url":"https://www.graphcanon.com/api/graphcanon/tools/ise-uiuc-magicoder","graph_url":"https://www.graphcanon.com/api/graphcanon/graph?tool=ise-uiuc-magicoder","description":"[ICML'24] Magicoder: Empowering Code Generation with OSS-Instruct","homepage_url":"https://proceedings.mlr.press/v235/wei24h.html","license":"MIT","open_issues":4,"watchers":24,"ai_summary":null,"readme_excerpt":"## 🚀 Quick Start\n\n```python\nfrom transformers import pipeline\nimport torch\n\nMAGICODER_PROMPT = \"\"\"You are an exceptionally intelligent coding assistant that consistently delivers accurate and reliable responses to user instructions.\n\n@@ Instruction\n{instruction}\n\n@@ Response\n\"\"\"\n\ninstruction = \"Implement a high-level API for a TODO list application. The API takes as input an operation request and updates the TODO list in place. If the request is invalid, raise an exception.\"\n\nprompt = MAGICODER_PROMPT.format(instruction=instruction)\ngenerator = pipeline(\n    model=\"ise-uiuc/Magicoder-S-DS-6.7B\",\n    task=\"text-generation\",\n    torch_dtype=torch.bfloat16,\n    device_map=\"auto\",\n)\nresult = generator(prompt, max_length=2048, num_return_sequences=1, temperature=0.0)\nprint(result[0][\"generated_text\"])\n```\n\nThis code snippet will generate the following output:\n\n``````\nHere is a simple Python implementation of a TODO list API:\n\n```python\nclass TodoList:\n    def __init__(self):\n        self.todo_list = []\n\n    def add_task(self, task):\n        if not isinstance(task, str):\n            raise ValueError(\"Task must be a string\")\n        self.todo_list.append(task)\n\n    def remove_task(self, task):\n        if task not in self.todo_list:\n            raise ValueError(\"Task not found in the list\")\n        self.todo_list.remove(task)\n\n    def get_tasks(self):\n        return self.todo_list\n\n    def update_task(self, old_task, new_task):\n        if old_task not in self.todo_list:\n            raise ValueError(\"Old task not found in the list\")\n        if not isinstance(new_task, str):\n            raise ValueError(\"New task must be a string\")\n        index = self.todo_list.index(old_task)\n        self.todo_list[index] = new_task\n\n    def clear_list(self):\n        self.todo_list = []\n```\n\nThis API allows you to add tasks, remove tasks, get all tasks, update tasks, and clear the list. It also raises exceptions for invalid operations.\n\nYou can use this API like this:\n\n```python\ntodo = TodoList()\ntodo.add_task(\"Buy groceries\")\ntodo.add_task(\"Finish project\")\nprint(todo.get_tasks())  # Output: ['Buy groceries', 'Finish project']\ntodo.update_task(\"Buy groceries\", \"Buy fruits\")\nprint(todo.get_tasks())  # Output: ['Buy fruits', 'Finish project']\ntodo.remove_task(\"Finish project\")\nprint(todo.get_tasks())  # Output: ['Buy fruits']\ntodo.clear_list()\nprint(todo.get_tasks())  # Output: []\n```\n``````","github_created_at":"2023-11-10T07:35:29+00:00","created_at":"2026-07-11T23:44:09.892636+00:00","updated_at":"2026-07-11T23:44:13.438913+00:00","categories":[{"slug":"llm-frameworks","name":"LLM Frameworks","url":"https://www.graphcanon.com/categories/llm-frameworks","markdown_url":"https://www.graphcanon.com/categories/llm-frameworks.md","api_url":"https://www.graphcanon.com/api/graphcanon/categories/llm-frameworks"},{"slug":"model-training","name":"Model Training","url":"https://www.graphcanon.com/categories/model-training","markdown_url":"https://www.graphcanon.com/categories/model-training.md","api_url":"https://www.graphcanon.com/api/graphcanon/categories/model-training"},{"slug":"data-retrieval","name":"Data & Retrieval","url":"https://www.graphcanon.com/categories/data-retrieval","markdown_url":"https://www.graphcanon.com/categories/data-retrieval.md","api_url":"https://www.graphcanon.com/api/graphcanon/categories/data-retrieval"}],"tags":[{"slug":"llm4code","name":"llm4code"},{"slug":"llm","name":"llm"},{"slug":"python","name":"python"},{"slug":"large-language-models","name":"large-language-models"},{"slug":"ai4code","name":"ai4code"}],"trust":{"provenance":{"is_fork":false,"github_id":716937075,"owner_type":"Organization","methodology":"github_public_v1","parent_repo":null,"near_duplicate_slugs":[]},"computed_at":"2026-07-11T23:44:10.914Z","maintenance":{"label":"Dormant","score":18,"methodology":"github_public_v1","releases_90d":0,"days_since_push":617,"last_release_at":null},"security_summary":{"status":"no_lockfile","scanner":null,"low_count":0,"high_count":0,"last_scan_at":"2026-07-11T23:44:11.359Z","medium_count":0,"scan_profile":"none","critical_count":0}},"capability_facts":{"scan":{"source":"repo_scan","observed_at":"2026-07-11T23:44:10.669Z"},"languages":{"value":["python"],"source":"github.language+pyproject.toml","observed_at":"2026-07-11T23:44:10.669Z"},"license_spdx":{"value":"MIT","source":"github.license","observed_at":"2026-07-11T23:44:10.669Z"}}}}