Metadata-Version: 2.4
Name: modelco
Version: 0.0.1.3
Summary: LLM collaboration
Author-email: Shangbin Feng <shangbin@cs.washington.edu>
License-Expression: LGPL-3.0-only
Project-URL: Homepage, https://github.com/BunsenFeng/model_collaboration
Project-URL: Issues, https://github.com/BunsenFeng/model_collaboration/issues
Classifier: Programming Language :: Python :: 3
Requires-Python: >=3.11.13
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: accelerate==1.6.0
Requires-Dist: aiohttp==3.12.14
Requires-Dist: aiosignal==1.4.0
Requires-Dist: attrs==25.3.0
Requires-Dist: certifi==2025.6.15
Requires-Dist: charset-normalizer==3.4.2
Requires-Dist: datasets==4.0.0
Requires-Dist: dill==0.3.8
Requires-Dist: filelock==3.18.0
Requires-Dist: frozenlist==1.7.0
Requires-Dist: fsspec==2025.3.0
Requires-Dist: huggingface-hub==0.33.1
Requires-Dist: idna==3.10
Requires-Dist: jinja2==3.1.6
Requires-Dist: markupsafe==3.0.2
Requires-Dist: mergekit==0.1.4
Requires-Dist: multidict==6.6.3
Requires-Dist: multiprocess==0.70.16
Requires-Dist: nevergrad
Requires-Dist: numpy==2.3.1
Requires-Dist: openai==1.93.2
Requires-Dist: packaging==25.0
Requires-Dist: pandas==2.3.1
Requires-Dist: pillow==11.2.1
Requires-Dist: protobuf==6.31.1
Requires-Dist: psutil==7.0.0
Requires-Dist: pyarrow==20.0.0
Requires-Dist: python-dateutil==2.9.0.post0
Requires-Dist: pytz==2025.2
Requires-Dist: pyyaml==6.0.2
Requires-Dist: regex==2024.11.6
Requires-Dist: requests==2.32.4
Requires-Dist: safetensors==0.5.3
Requires-Dist: scipy==1.16.1
Requires-Dist: six==1.17.0
Requires-Dist: sympy==1.14.0
Requires-Dist: tenacity==9.1.2
Requires-Dist: tokenizers==0.21.2
Requires-Dist: torch==2.7.1
Requires-Dist: torch-geometric==2.7.0
Requires-Dist: torchaudio==2.7.1
Requires-Dist: torchvision==0.22.1
Requires-Dist: tqdm==4.67.1
Requires-Dist: transformers==4.53.0
Requires-Dist: triton==3.3.1
Requires-Dist: trl==0.19.1
Requires-Dist: typing-extensions==4.14.0
Requires-Dist: typing-inspection==0.4.1
Requires-Dist: urllib3==2.5.0
Requires-Dist: wcwidth==0.2.13
Requires-Dist: xxhash==3.5.0
Requires-Dist: yarl==1.20.1
Dynamic: license-file

# model_collaboration

The future is now.

### Contributors who just joined us, read this

Thank you for joining this effort! Kindly do the following:
1. Get familiar with "Github Setup" in this readme: you need to create your own branch, code in your branch, and submit pull requests from your branch to the dev branch. **Never edit anything on the dev branch.**
2. Follow "After that, quick start!!" in this readme.
3. Read the beginning of `method/user_readme.md` and briefly check out the methods we already have here.
4. Follow `method/sample_approach.py` and `method/developer_readme.md` to develop your own method. Try to use the helper functions provided there if possible (such as `distributed_generation.distributed_generation`).
5. After you implemented and tested your method, git add commit push, open a pull request from your branch to dev, assign your point of contact and Shangbin as the two reviewers.

### Github Setup

1. Clone the repo with `https://github.com/BunsenFeng/model_collaboration.git`.
2. Checkout to the dev branch: `git checkout dev`
3. Pull the latest changes from the dev branch to your local dev branch: `git pull`
4. Create your own feature/hotfix branch on local: `git checkout -b [your-local-branch-name]`
5. Make edits on the scripts you care.
6. Push any changes you made on your local branch to the GitHub server - after `git add` and `git commit` operations, do `git push`, you will see `git push --set-upstream origin [your-local-branch-name]` suggested by github, copy and paste this command and run.
7. Open a new Pull Request from the GitHub webpage, **make sure it's merging from `[your-local-branch-name]` to the `dev` branch**. Add any reviewer and Shangbin that matters to the changes.
8. Once approved, merge the changes to the `dev` branch.
9. After merging, you will see an option on the webpage to delete your own branch. Delete it.
10. Loop from #2.

If you are in the middle of the development, and you need the latest changes from dev branch, follow the steps below:
1. Keep track of the current changes you made on your local branch: `git add` and `git commit` your `[your-local-branch-name]`
2. Checkout to the dev branch: `git checkout dev`
3. Pull the latest changes from the dev branch: `git pull`
4. Check back to your local branch: `git checkout [your-local-branch-name]`
5. Merge the changes from dev branch to your own branch: `git merge dev`
6. Keep working on your own branch. done.

Questions about git? Don't take guesses, email `svenyan234@gmail.com` and cc `bunsenfeng@gmail.com`.

### After that, quick start!!

```
conda env create -f environment.yml
conda activate model_collaboration
cd ..
git clone https://github.com/arcee-ai/mergekit.git
cd mergekit
pip install -e .
cd ..
cd model_collaboration
```

Run your first model collaboration experiment (if you don't have 3 GPUs, go to `test_config.json` and set `"gpu_ids": [0]`, `[0,1]`, or whatever you have; if your GPU is nice, increase `batch_size`):

```
python main.py -c test_config.json
```

You will see the outputs and evaluation results in the `logs/` folder.

See `method/user_readme.md` for more details about different collaboration methods implemented.

Zhaoxuan (our evaluation tsar), additionally see `data/eval_readme.md`.
