{"id":28676559,"url":"https://github.com/zjunlp/oneedit","last_synced_at":"2025-10-16T11:47:59.919Z","repository":{"id":254787673,"uuid":"763026655","full_name":"zjunlp/OneEdit","owner":"zjunlp","description":"OneEdit: A Neural-Symbolic Collaboratively Knowledge Editing System.","archived":false,"fork":false,"pushed_at":"2024-09-16T08:54:46.000Z","size":846,"stargazers_count":14,"open_issues_count":0,"forks_count":0,"subscribers_count":5,"default_branch":"main","last_synced_at":"2024-09-17T02:37:02.700Z","etag":null,"topics":["allspark","artificial-intelligence","collaborative-editing","knowledge-editing","knowledge-graph","large-language-models","model-editing","natural-language-processing","neural-symbolic","system"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/zjunlp.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":null,"license":null,"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-02-25T11:13:15.000Z","updated_at":"2024-09-16T08:54:49.000Z","dependencies_parsed_at":"2024-08-29T08:44:00.468Z","dependency_job_id":null,"html_url":"https://github.com/zjunlp/OneEdit","commit_stats":null,"previous_names":["zjunlp/oneedit"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/zjunlp/OneEdit","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zjunlp%2FOneEdit","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zjunlp%2FOneEdit/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zjunlp%2FOneEdit/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zjunlp%2FOneEdit/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/zjunlp","download_url":"https://codeload.github.com/zjunlp/OneEdit/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zjunlp%2FOneEdit/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":259732771,"owners_count":22903087,"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":["allspark","artificial-intelligence","collaborative-editing","knowledge-editing","knowledge-graph","large-language-models","model-editing","natural-language-processing","neural-symbolic","system"],"created_at":"2025-06-13T23:05:07.916Z","updated_at":"2025-10-16T11:47:54.866Z","avatar_url":"https://github.com/zjunlp.png","language":"Python","readme":"\u003ch1 align=\"center\"\u003e OneEdit \u003c/h1\u003e\n\u003ch3 align=\"center\"\u003e OneEdit: A Neural-Symbolic Collaboratively Knowledge Editing System \u003c/h3\u003e\n\n$\\color{red}{It\\'s\\  unfortunate\\  that\\  due\\  to\\  limited\\  computational\\  resources,\\  we\\  have\\  suspended\\  the\\  online\\  demo.}$\n$\\color{red}{If\\  you\\'d\\  like\\  to\\  try\\  the\\  demo,\\  please\\  contact\\  xizekun2023 \\@zju.edu.cn\\  or\\  zhangningyu \\@zju.edu.cn}$\n\n\n\u003cp align=\"center\"\u003e\n  📃 \u003ca href=\"https://arxiv.org/abs/2409.07497\" target=\"_blank\"\u003earXiv\u003c/a\u003e \n  🐳 \u003ca href=\"https://pan.baidu.com/s/1vSMaHRs79sgtvsvDc_rMxg?pwd=z9bg\" target=\"_blank\"\u003edocker\u003c/a\u003e \n\n\u003c/p\u003e\n\n[![Click to watch the video](overview.png)](video.mp4)\n\n\u003cp align=\"center\"\u003e\n  Click the photo above to watch the video\n\u003c/p\u003e\n\n[![Awesome](https://awesome.re/badge.svg)](https://github.com/zjunlp/KnowledgeCircuits) \n[![License: MIT](https://img.shields.io/badge/License-MIT-green.svg)](https://opensource.org/licenses/MIT)\n![](https://img.shields.io/github/last-commit/zjunlp/KnowledgeCircuits?color=green) \n\n\n## Table of Contents\n- 🌟[Overview](#overview)\n- 🔧[Installation](#installation)\n- 📚[Quick Start](#Quick-Start)\n- 📉[Hparam](#Choose-Your-Hparam)\n- 🧐[Demo](#demo)\n\n---\n\n\n## 🌟Overview\n\nSince the inception of artificial intelligence, knowledge representation has always been one of its core objectives. This work primarily focuses on integrating the parametric knowledge of large language models with symbolic knowledge, enabling more precise modifications to the model's parametric knowledge.\n\n\n## 🔧Installation\n### Prerequisites\n- Python 3.10\n- Conda\n- Neo4j Enterprise Edition 3.5.35\n- Node.js and Yarn (for the web interface)\n\n### Conda Environment\n\nTo get started, please install conda run the following code to build the environment.\n```\nconda create -n oneedit python=3.10\npip install -r requirements.txt\n```\n\n## 📚Quick Start\n\n### Start neo4j\n\nFirst, you need to start the Neo4j service and ensure that local ports 7474 and 7687 are available.\nWhen you enter the command\n```\nneo4j start\n```\nsee the message\n\"Neo4j is already running,\"\nit indicates that Neo4j is successfully running on your machine.\n\n### Run code\n\nThen, you can load the data according to the path specified in the project and run the code by entering the following command.\n```\npython exp.py \\\n  --datapath data_path \\\n  --harampath haram_path\n```\n### Web\nFirst, you need to start our service on the backend.\n```\npython server.py\n```\n\u003e We will use port 2001 on your local machine to provide backend services.\n\nThen, you can extract the downloaded web page into the project directory, run the web code to test the model outputs, input through the visual interface, and observe changes in the knowledge graph in real time.\n```\ncd web\nyarn dev start\n```\nYou can view in real-time on the backend which knowledge has been edited and which has been rolled back.\n\n\n## 📉Choose Your Hparam\nAll our experimental parameters are stored in the `hparams.yaml` file, which you can easily modify to run experiments with various models and methods.\n### Set Editor Hparam\nYou need to set the name of the model you want to run and the knowledge editing method in the edit_method and model_name fields of the hparam file. \n\n\u003eCurrently, we only support `GRACE` and `MEMIT`, with partial support for `ROME`.\n\n### Set Noo4j Hparam\nYou need to specify your Neo4j URL, username, and password in the hyperparameters.\n\n\u003e By default, your Neo4j account and password are usually both set to neo4j.\n\n### Set Interpreter Hparam\nFinally, you need to specify the path for the interpreter. We provide a LoRA-trained MiniCPM 2B model for you to use. You can download it from the project's [Google Drive](https://drive.google.com/drive/folders/1hQQV6AtgaDxLJ7OW2oCBtNFlLEUMITYw?usp=sharing) and then set the path accordingly.\n\n## 🧐Demo\nWe provide a user-friendly web interface for ease of use.\nDue to the large size of the web page, we have stored it on [Google Drive](https://drive.google.com/drive/folders/1hQQV6AtgaDxLJ7OW2oCBtNFlLEUMITYw?usp=sharing).\nYou need to download and extract it, then store it in the project directory.\n\n\n\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzjunlp%2Foneedit","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fzjunlp%2Foneedit","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzjunlp%2Foneedit/lists"}