34074adb36 | ||
---|---|---|
.github | ||
.vscode | ||
archai | ||
confs | ||
devops | ||
docker | ||
docs | ||
research | ||
scripts | ||
tasks/text_generation | ||
tests | ||
.amltignore | ||
.gitattributes | ||
.gitignore | ||
AUTHORS.md | ||
CODE_OF_CONDUCT.md | ||
CONTRIBUTING.md | ||
LICENSE | ||
NOTICE.md | ||
README.md | ||
SECURITY.md | ||
pyproject.toml | ||
pytest.ini | ||
setup.cfg | ||
setup.py |
README.md
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:
pip install archai
Archai requires Python 3.7+ and PyTorch 1.7.0+ to function properly.
For further information, please consult the installation guide.
Quickstart
In this quickstart example, we will apply Archai in Natural Language Processing through the TransformerFlex
search space, which performs NAS through a set of Transformers' configurations and finds the optimal Pareto-frontier according to a set of objectives.
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 TransformerFlexOnnxMemory
from archai.discrete_search.search_spaces.nlp.transformer_flex.search_space import TransformerFlexSearchSpace
space = TransformerFlexSearchSpace("codegen")
objectives = {
"non_embedding_params": NonEmbeddingParamsProxy(),
"onnx_latency": TransformerFlexOnnxLatency(space),
"onnx_memory": TransformerFlexOnnxMemory(space),
}
After we have initialized both space and objectives, we will import and use the EvolutionParetoSearch
algorithm to conduct the search:
from archai.discrete_search.algos.evolution_pareto import EvolutionParetoSearch
algo = EvolutionParetoSearch(
space,
objectives,
None,
"tmp",
num_iters=5,
init_num_models=10,
seed=1234,
)
algo.search()
The search()
method is called to start the NAS process. 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
This section is under development.
Documentation
To demonstrate the capabilities of Archai, a series of documented examples are provided to showcase its functionality:
For additional information, please refer to the official documentation.
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: archai@microsoft.com
- Website: https://github.com/microsoft/archai/issues
We 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, Debadeepta Dey, Gustavo de Rosa, Caio Mendes, Piero Kauffmann, Allie Del Giorno, Mojan Javaheripi, and Ofer Dekel 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. For more information see the Code of Conduct FAQ or contact opencode@microsoft.com 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 for more details.