Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/microsoft/archai
Accelerate your Neural Architecture Search (NAS) through fast, reproducible and modular research.
https://github.com/microsoft/archai
automated-machine-learning automl darts deep-learning hyperparameter-optimization machine-learning model-compression nas neural-architecture-search petridish python pytorch
Last synced: about 1 month ago
JSON representation
Accelerate your Neural Architecture Search (NAS) through fast, reproducible and modular research.
- Host: GitHub
- URL: https://github.com/microsoft/archai
- Owner: microsoft
- License: mit
- Created: 2020-03-05T00:54:29.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2023-12-22T19:29:15.000Z (11 months ago)
- Last Synced: 2024-10-01T04:42:16.822Z (about 1 month ago)
- Topics: automated-machine-learning, automl, darts, deep-learning, hyperparameter-optimization, machine-learning, model-compression, nas, neural-architecture-search, petridish, python, pytorch
- Language: Python
- Homepage: https://microsoft.github.io/archai
- Size: 50.2 MB
- Stars: 464
- Watchers: 27
- Forks: 91
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
- Codeowners: CODEOWNERS
- Security: SECURITY.md
- Support: docs/support/contact.rst
- Authors: AUTHORS.md
Awesome Lists containing this project
- awesome-llmops - Archai - square) | (AutoML / Profiling)
README
Archai accelerates your Neural Architecture Search (NAS) through fast, reproducible and modular research, enabling the generation of efficient deep networks for various applications.
## Installation
Archai can be installed through various methods, however, it is recommended to utilize a virtual environment such as `conda` or `pyenv` for optimal results.
To install Archai via PyPI, the following command can be executed:
```bash
pip install archai
```**Archai requires Python 3.8+ and PyTorch 1.7.0+ to function properly.**
For further information, please consult the [installation guide](https://microsoft.github.io/archai/getting_started/installation.html).
## Quickstart
In this quickstart example, we will apply Archai in Natural Language Processing to find the optimal Pareto-frontier Transformers' configurations according to a set of objectives.
### Creating the Search Space
We start by importing the `TransformerFlexSearchSpace` class which represents the search space for the Transformer architecture:
```python
from archai.discrete_search.search_spaces.nlp.transformer_flex.search_space import TransformerFlexSearchSpacespace = TransformerFlexSearchSpace("gpt2")
```### Defining Search Objectives
Next, we define the objectives we want to optimize. In this example, we use `NonEmbeddingParamsProxy`, `TransformerFlexOnnxLatency`, and `TransformerFlexOnnxMemory` to define the objectives:
```python
from archai.discrete_search.api.search_objectives import SearchObjectives
from archai.discrete_search.evaluators.nlp.parameters import NonEmbeddingParamsProxy
from archai.discrete_search.evaluators.nlp.transformer_flex_latency import TransformerFlexOnnxLatency
from archai.discrete_search.evaluators.nlp.transformer_flex_memory import TransformerFlexOnnxMemorysearch_objectives = SearchObjectives()
search_objectives.add_objective(
"non_embedding_params",
NonEmbeddingParamsProxy(),
higher_is_better=True,
compute_intensive=False,
constraint=(1e6, 1e9),
)
search_objectives.add_objective(
"onnx_latency",
TransformerFlexOnnxLatency(space),
higher_is_better=False,
compute_intensive=False,
)
search_objectives.add_objective(
"onnx_memory",
TransformerFlexOnnxMemory(space),
higher_is_better=False,
compute_intensive=False,
)
```### Initializing the Algorithm
We use the `EvolutionParetoSearch` algorithm to conduct the search:
```python
from archai.discrete_search.algos.evolution_pareto import EvolutionParetoSearchalgo = EvolutionParetoSearch(
space,
search_objectives,
None,
"tmp",
num_iters=5,
init_num_models=10,
seed=1234,
)
```### Performing the Search
Finally, we call the `search()` method to start the NAS process:
```python
algo.search()
```The algorithm will iterate through different network architectures, evaluate their performance based on the defined objectives, and ultimately produce a frontier of Pareto-optimal results.
## Tasks
To demonstrate and showcase the capabilities/functionalities of Archai, a set of end-to-end tasks are provided:
* [Text Generation](https://github.com/microsoft/archai/blob/main/tasks/text_generation).
* [Face Segmentation](https://github.com/microsoft/archai/blob/main/tasks/face_segmentation).## Documentation
The [official documentation](https://microsoft.github.io/archai) also provides a series of [notebooks](https://microsoft.github.io/archai/getting_started/notebooks.html).
## Support
If you have any questions or feedback about the Archai project or the open problems in Neural Architecture Search, please feel free to contact us using the following information:
* Email: [email protected]
* Website: https://github.com/microsoft/archai/issuesWe welcome any questions, feedback, or suggestions you may have and look forward to hearing from you.
### Team
Archai has been created and maintained by [Shital Shah](https://shital.com), [Debadeepta Dey](https://debadeepta.com), [Gustavo de Rosa](https://www.microsoft.com/en-us/research/people/gderosa), Caio Mendes, [Piero Kauffmann](https://www.microsoft.com/en-us/research/people/pkauffmann), [Chris Lovett](https://lovettsoftware.com), Allie Del Giorno, Mojan Javaheripi, and [Ofer Dekel](https://www.microsoft.com/en-us/research/people/oferd) at Microsoft Research.
### Contributions
This project welcomes contributions and suggestions. Most contributions require you to agree to a Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us the rights to use your contribution. For details, visit https://cla.microsoft.com.
When you submit a pull request, a CLA-bot will automatically determine whether you need to provide a CLA and decorate the PR appropriately (e.g., label, comment). Simply follow the instructions provided by the bot. You will only need to do this once across all repositories using our CLA.
This project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/). For more information see the [Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/) or contact [[email protected]](mailto:[email protected]) with any additional questions or comments.
### Trademark
This project may contain trademarks or logos for projects, products, or services. Authorized use of Microsoft trademarks or logos is subject to and must follow Microsoft's Trademark & Brand Guidelines. Use of Microsoft trademarks or logos in modified versions of this project must not cause confusion or imply Microsoft sponsorship. Any use of third-party trademarks or logos are subject to those third-party's policies.
### License
This project is released under the MIT License. Please review the [file](https://github.com/microsoft/archai/blob/main/LICENSE) for more details.