repo_id
stringlengths 1
51
| file_structure
stringlengths 56
247k
| readme_content
stringlengths 0
287k
| key_code_snippets
stringlengths 1.04k
16.8M
| __index_level_0__
float64 0
7
⌀ |
---|---|---|---|---|
100-times-faster-nlp | {"type": "directory", "name": "100-times-faster-nlp", "children": [{"type": "file", "name": "100-times-faster-nlp-in-python.html"}, {"type": "file", "name": "100-times-faster-nlp-in-python.ipynb"}, {"type": "file", "name": "README.md"}]} | # 🚀 100 Times Faster Natural Language Processing in Python
This repository contains an iPython notebook accompanying the post [🚀100 Times Faster Natural Language Processing in Python](https://medium.com/huggingface/100-times-faster-natural-language-processing-in-python-ee32033bdced).
The notebook contains all the examples of the post running in a iPython session.
Online, the notebook can be better visualized [on nbviewer](https://nbviewer.jupyter.org/github/huggingface/100-times-faster-nlp/blob/master/100-times-faster-nlp-in-python.ipynb) (Github's ipynb visualizer doesn't render well Cython interactive annotations).
| {".git\\hooks\\applypatch-msg.sample": "#!/bin/sh\n#\n# An example hook script to check the commit log message taken by\n# applypatch from an e-mail message.\n#\n# The hook should exit with non-zero status after issuing an\n# appropriate message if it wants to stop the commit. The hook is\n# allowed to edit the commit message file.\n#\n# To enable this hook, rename this file to \"applypatch-msg\".\n\n. git-sh-setup\ncommitmsg=\"$(git rev-parse --git-path hooks/commit-msg)\"\ntest -x \"$commitmsg\" && exec \"$commitmsg\" ${1+\"$@\"}\n:\n", ".git\\hooks\\pre-applypatch.sample": "#!/bin/sh\n#\n# An example hook script to verify what is about to be committed\n# by applypatch from an e-mail message.\n#\n# The hook should exit with non-zero status after issuing an\n# appropriate message if it wants to stop the commit.\n#\n# To enable this hook, rename this file to \"pre-applypatch\".\n\n. git-sh-setup\nprecommit=\"$(git rev-parse --git-path hooks/pre-commit)\"\ntest -x \"$precommit\" && exec \"$precommit\" ${1+\"$@\"}\n:\n"} | 0 |
accelerate | {"type": "directory", "name": "accelerate", "children": [{"type": "directory", "name": ".devcontainer", "children": [{"type": "file", "name": "devcontainer.json"}]}, {"type": "file", "name": ".pre-commit-config.yaml"}, {"type": "directory", "name": "benchmarks", "children": [{"type": "directory", "name": "big_model_inference", "children": [{"type": "file", "name": "big_model_inference.py"}, {"type": "file", "name": "measures_util.py"}, {"type": "file", "name": "README.md"}]}, {"type": "directory", "name": "fp8", "children": [{"type": "directory", "name": "ms_amp", "children": [{"type": "file", "name": "ddp.py"}, {"type": "file", "name": "distrib_deepspeed.py"}, {"type": "file", "name": "Dockerfile"}, {"type": "file", "name": "fp8_utils.py"}, {"type": "file", "name": "non_distributed.py"}]}, {"type": "directory", "name": "transformer_engine", "children": [{"type": "file", "name": "ddp.py"}, {"type": "file", "name": "distrib_deepspeed.py"}, {"type": "file", "name": "Dockerfile"}, {"type": "file", "name": "fp8_utils.py"}, {"type": "file", "name": "fsdp.py"}, {"type": "file", "name": "non_distributed.py"}, {"type": "file", "name": "README.md"}]}]}, {"type": "file", "name": "README.md"}]}, {"type": "file", "name": "CODE_OF_CONDUCT.md"}, {"type": "file", "name": "CONTRIBUTING.md"}, {"type": "directory", "name": "docker", "children": [{"type": "directory", "name": "accelerate-cpu", "children": [{"type": "file", "name": "Dockerfile"}]}, {"type": "directory", "name": "accelerate-gpu", "children": [{"type": "file", "name": "Dockerfile"}]}, {"type": "directory", "name": "accelerate-gpu-deepspeed", "children": [{"type": "file", "name": "Dockerfile"}]}, {"type": "file", "name": "README.md"}]}, {"type": "directory", "name": "docs", "children": [{"type": "file", "name": "Makefile"}, {"type": "file", "name": "README.md"}, {"type": "directory", "name": "source", "children": [{"type": "directory", "name": "basic_tutorials", "children": [{"type": "file", "name": "execution.md"}, {"type": "file", "name": "install.md"}, {"type": "file", "name": "launch.md"}, {"type": "file", "name": "migration.md"}, {"type": "file", "name": "notebook.md"}, {"type": "file", "name": "overview.md"}, {"type": "file", "name": "tpu.md"}, {"type": "file", "name": "troubleshooting.md"}]}, {"type": "directory", "name": "concept_guides", "children": [{"type": "file", "name": "big_model_inference.md"}, {"type": "file", "name": "deferring_execution.md"}, {"type": "file", "name": "fsdp_and_deepspeed.md"}, {"type": "file", "name": "gradient_synchronization.md"}, {"type": "file", "name": "internal_mechanism.md"}, {"type": "file", "name": "low_precision_training.md"}, {"type": "file", "name": "performance.md"}, {"type": "file", "name": "training_tpu.md"}]}, {"type": "directory", "name": "imgs", "children": []}, {"type": "file", "name": "index.md"}, {"type": "directory", "name": "package_reference", "children": [{"type": "file", "name": "accelerator.md"}, {"type": "file", "name": "big_modeling.md"}, {"type": "file", "name": "cli.md"}, {"type": "file", "name": "deepspeed.md"}, {"type": "file", "name": "fp8.md"}, {"type": "file", "name": "fsdp.md"}, {"type": "file", "name": "inference.md"}, {"type": "file", "name": "kwargs.md"}, {"type": "file", "name": "launchers.md"}, {"type": "file", "name": "logging.md"}, {"type": "file", "name": "megatron_lm.md"}, {"type": "file", "name": "state.md"}, {"type": "file", "name": "torch_wrappers.md"}, {"type": "file", "name": "tracking.md"}, {"type": "file", "name": "utilities.md"}]}, {"type": "file", "name": "quicktour.md"}, {"type": "directory", "name": "usage_guides", "children": [{"type": "file", "name": "big_modeling.md"}, {"type": "file", "name": "checkpoint.md"}, {"type": "file", "name": "ddp_comm_hook.md"}, {"type": "file", "name": "deepspeed.md"}, {"type": "file", "name": "deepspeed_multiple_model.md"}, {"type": "file", "name": "distributed_inference.md"}, {"type": "file", "name": "explore.md"}, {"type": "file", "name": "fsdp.md"}, {"type": "file", "name": "gradient_accumulation.md"}, {"type": "file", "name": "ipex.md"}, {"type": "file", "name": "local_sgd.md"}, {"type": "file", "name": "low_precision_training.md"}, {"type": "file", "name": "megatron_lm.md"}, {"type": "file", "name": "model_size_estimator.md"}, {"type": "file", "name": "mps.md"}, {"type": "file", "name": "profiler.md"}, {"type": "file", "name": "quantization.md"}, {"type": "file", "name": "sagemaker.md"}, {"type": "file", "name": "tracking.md"}, {"type": "file", "name": "training_zoo.md"}]}, {"type": "file", "name": "_toctree.yml"}]}]}, {"type": "directory", "name": "examples", "children": [{"type": "directory", "name": "by_feature", "children": [{"type": "file", "name": "automatic_gradient_accumulation.py"}, {"type": "file", "name": "checkpointing.py"}, {"type": "file", "name": "cross_validation.py"}, {"type": "file", "name": "ddp_comm_hook.py"}, {"type": "file", "name": "deepspeed_with_config_support.py"}, {"type": "file", "name": "early_stopping.py"}, {"type": "file", "name": "fsdp_with_peak_mem_tracking.py"}, {"type": "file", "name": "gradient_accumulation.py"}, {"type": "file", "name": "local_sgd.py"}, {"type": "file", "name": "megatron_lm_gpt_pretraining.py"}, {"type": "file", "name": "memory.py"}, {"type": "file", "name": "multi_process_metrics.py"}, {"type": "file", "name": "profiler.py"}, {"type": "file", "name": "README.md"}, {"type": "file", "name": "schedule_free.py"}, {"type": "file", "name": "tracking.py"}]}, {"type": "file", "name": "complete_cv_example.py"}, {"type": "file", "name": "complete_nlp_example.py"}, {"type": "directory", "name": "config_yaml_templates", "children": [{"type": "file", "name": "deepspeed.yaml"}, {"type": "file", "name": "fp8.yaml"}, {"type": "file", "name": "fsdp.yaml"}, {"type": "file", "name": "multi_gpu.yaml"}, {"type": "file", "name": "multi_node.yaml"}, {"type": "file", "name": "README.md"}, {"type": "file", "name": "run_me.py"}, {"type": "file", "name": "single_gpu.yaml"}]}, {"type": "file", "name": "cv_example.py"}, {"type": "directory", "name": "deepspeed_config_templates", "children": [{"type": "file", "name": "zero_stage1_config.json"}, {"type": "file", "name": "zero_stage2_config.json"}, {"type": "file", "name": "zero_stage2_offload_config.json"}, {"type": "file", "name": "zero_stage3_config.json"}, {"type": "file", "name": "zero_stage3_offload_config.json"}]}, {"type": "directory", "name": "inference", "children": [{"type": "directory", "name": "distributed", "children": [{"type": "file", "name": "distributed_image_generation.py"}, {"type": "file", "name": "phi2.py"}, {"type": "file", "name": "README.md"}, {"type": "file", "name": "stable_diffusion.py"}]}, {"type": "directory", "name": "pippy", "children": [{"type": "file", "name": "bert.py"}, {"type": "file", "name": "gpt2.py"}, {"type": "file", "name": "llama.py"}, {"type": "file", "name": "README.md"}, {"type": "file", "name": "requirements.txt"}, {"type": "file", "name": "t5.py"}]}]}, {"type": "file", "name": "multigpu_remote_launcher.py"}, {"type": "file", "name": "nlp_example.py"}, {"type": "file", "name": "README.md"}, {"type": "file", "name": "requirements.txt"}, {"type": "directory", "name": "slurm", "children": [{"type": "file", "name": "fsdp_config.yaml"}, {"type": "file", "name": "submit_multicpu.sh"}, {"type": "file", "name": "submit_multigpu.sh"}, {"type": "file", "name": "submit_multinode.sh"}, {"type": "file", "name": "submit_multinode_fsdp.sh"}]}]}, {"type": "file", "name": "LICENSE"}, {"type": "file", "name": "Makefile"}, {"type": "directory", "name": "manim_animations", "children": [{"type": "directory", "name": "big_model_inference", "children": [{"type": "file", "name": "stage_1.py"}, {"type": "file", "name": "stage_2.py"}, {"type": "file", "name": "stage_3.py"}, {"type": "file", "name": "stage_4.py"}, {"type": "file", "name": "stage_5.py"}]}, {"type": "directory", "name": "dataloaders", "children": [{"type": "file", "name": "stage_0.py"}, {"type": "file", "name": "stage_1.py"}, {"type": "file", "name": "stage_2.py"}, {"type": "file", "name": "stage_3.py"}, {"type": "file", "name": "stage_4.py"}, {"type": "file", "name": "stage_5.py"}, {"type": "file", "name": "stage_6.py"}, {"type": "file", "name": "stage_7.py"}]}]}, {"type": "file", "name": "pyproject.toml"}, {"type": "file", "name": "README.md"}, {"type": "file", "name": "setup.py"}, {"type": "directory", "name": "src", "children": [{"type": "directory", "name": "accelerate", "children": [{"type": "file", "name": "accelerator.py"}, {"type": "file", "name": "big_modeling.py"}, {"type": "file", "name": "checkpointing.py"}, {"type": "directory", "name": "commands", "children": [{"type": "file", "name": "accelerate_cli.py"}, {"type": "directory", "name": "config", "children": [{"type": "file", "name": "cluster.py"}, {"type": "file", "name": "config.py"}, {"type": "file", "name": "config_args.py"}, {"type": "file", "name": "config_utils.py"}, {"type": "file", "name": "default.py"}, {"type": "file", "name": "sagemaker.py"}, {"type": "file", "name": "update.py"}, {"type": "file", "name": "__init__.py"}]}, {"type": "file", "name": "env.py"}, {"type": "file", "name": "estimate.py"}, {"type": "file", "name": "launch.py"}, {"type": "directory", "name": "menu", "children": [{"type": "file", "name": "cursor.py"}, {"type": "file", "name": "helpers.py"}, {"type": "file", "name": "input.py"}, {"type": "file", "name": "keymap.py"}, {"type": "file", "name": "selection_menu.py"}, {"type": "file", "name": "__init__.py"}]}, {"type": "file", "name": "merge.py"}, {"type": "file", "name": "test.py"}, {"type": "file", "name": "tpu.py"}, {"type": "file", "name": "utils.py"}, {"type": "file", "name": "__init__.py"}]}, {"type": "file", "name": "data_loader.py"}, {"type": "file", "name": "hooks.py"}, {"type": "file", "name": "inference.py"}, {"type": "file", "name": "launchers.py"}, {"type": "file", "name": "local_sgd.py"}, {"type": "file", "name": "logging.py"}, {"type": "file", "name": "memory_utils.py"}, {"type": "file", "name": "optimizer.py"}, {"type": "file", "name": "scheduler.py"}, {"type": "file", "name": "state.py"}, {"type": "directory", "name": "test_utils", "children": [{"type": "file", "name": "examples.py"}, {"type": "directory", "name": "scripts", "children": [{"type": "directory", "name": "external_deps", "children": [{"type": "file", "name": "test_checkpointing.py"}, {"type": "file", "name": "test_ds_multiple_model.py"}, {"type": "file", "name": "test_metrics.py"}, {"type": "file", "name": "test_peak_memory_usage.py"}, {"type": "file", "name": "test_performance.py"}, {"type": "file", "name": "test_pippy.py"}, {"type": "file", "name": "test_zero3_integration.py"}, {"type": "file", "name": "__init__.py"}]}, {"type": "file", "name": "test_cli.py"}, {"type": "file", "name": "test_ddp_comm_hook.py"}, {"type": "file", "name": "test_distributed_data_loop.py"}, {"type": "file", "name": "test_merge_weights.py"}, {"type": "file", "name": "test_notebook.py"}, {"type": "file", "name": "test_ops.py"}, {"type": "file", "name": "test_script.py"}, {"type": "file", "name": "test_sync.py"}, {"type": "file", "name": "__init__.py"}]}, {"type": "file", "name": "testing.py"}, {"type": "file", "name": "training.py"}, {"type": "file", "name": "__init__.py"}]}, {"type": "file", "name": "tracking.py"}, {"type": "directory", "name": "utils", "children": [{"type": "file", "name": "bnb.py"}, {"type": "file", "name": "constants.py"}, {"type": "file", "name": "dataclasses.py"}, {"type": "file", "name": "deepspeed.py"}, {"type": "file", "name": "environment.py"}, {"type": "file", "name": "fsdp_utils.py"}, {"type": "file", "name": "imports.py"}, {"type": "file", "name": "launch.py"}, {"type": "file", "name": "megatron_lm.py"}, {"type": "file", "name": "memory.py"}, {"type": "file", "name": "modeling.py"}, {"type": "file", "name": "offload.py"}, {"type": "file", "name": "operations.py"}, {"type": "file", "name": "other.py"}, {"type": "file", "name": "random.py"}, {"type": "file", "name": "rich.py"}, {"type": "file", "name": "torch_xla.py"}, {"type": "file", "name": "tqdm.py"}, {"type": "file", "name": "transformer_engine.py"}, {"type": "file", "name": "versions.py"}, {"type": "file", "name": "__init__.py"}]}, {"type": "file", "name": "__init__.py"}]}]}, {"type": "directory", "name": "tests", "children": [{"type": "directory", "name": "deepspeed", "children": [{"type": "file", "name": "ds_config_zero2.json"}, {"type": "file", "name": "ds_config_zero2_model_only.json"}, {"type": "file", "name": "ds_config_zero3.json"}, {"type": "file", "name": "ds_config_zero3_model_only.json"}, {"type": "file", "name": "test_deepspeed.py"}, {"type": "file", "name": "test_deepspeed_multiple_model.py"}]}, {"type": "directory", "name": "fsdp", "children": [{"type": "file", "name": "test_fsdp.py"}]}, {"type": "file", "name": "test_accelerator.py"}, {"type": "file", "name": "test_big_modeling.py"}, {"type": "file", "name": "test_cli.py"}, {"type": "directory", "name": "test_configs", "children": [{"type": "file", "name": "0_11_0.yaml"}, {"type": "file", "name": "0_12_0.yaml"}, {"type": "file", "name": "0_28_0_mpi.yaml"}, {"type": "file", "name": "0_30_0_sagemaker.yaml"}, {"type": "file", "name": "0_34_0_fp8.yaml"}, {"type": "file", "name": "invalid_keys.yaml"}, {"type": "file", "name": "latest.yaml"}, {"type": "file", "name": "README.md"}]}, {"type": "file", "name": "test_cpu.py"}, {"type": "file", "name": "test_data_loader.py"}, {"type": "file", "name": "test_examples.py"}, {"type": "file", "name": "test_grad_sync.py"}, {"type": "file", "name": "test_hooks.py"}, {"type": "file", "name": "test_imports.py"}, {"type": "file", "name": "test_kwargs_handlers.py"}, {"type": "file", "name": "test_logging.py"}, {"type": "file", "name": "test_memory_utils.py"}, {"type": "file", "name": "test_metrics.py"}, {"type": "file", "name": "test_modeling_utils.py"}, {"type": "file", "name": "test_multigpu.py"}, {"type": "file", "name": "test_offload.py"}, {"type": "file", "name": "test_optimizer.py"}, {"type": "file", "name": "test_quantization.py"}, {"type": "file", "name": "test_sagemaker.py"}, {"type": "directory", "name": "test_samples", "children": [{"type": "directory", "name": "MRPC", "children": [{"type": "file", "name": "dev.csv"}, {"type": "file", "name": "train.csv"}]}, {"type": "file", "name": "test_command_file.sh"}]}, {"type": "file", "name": "test_scheduler.py"}, {"type": "file", "name": "test_state_checkpointing.py"}, {"type": "file", "name": "test_tpu.py"}, {"type": "file", "name": "test_tracking.py"}, {"type": "file", "name": "test_utils.py"}, {"type": "file", "name": "xla_spawn.py"}]}, {"type": "directory", "name": "utils", "children": [{"type": "file", "name": "log_reports.py"}, {"type": "file", "name": "stale.py"}]}]} | This folder contains test configs for `accelerate config`. These should be generated for each major version
and are written based on `accelerate config` and selecting the "No distributed training" option. | {"setup.py": "# Copyright 2021 The HuggingFace Team. All rights reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n\nfrom setuptools import find_packages, setup\n\n\nextras = {}\nextras[\"quality\"] = [\n \"black ~= 23.1\", # hf-doc-builder has a hidden dependency on `black`\n \"hf-doc-builder >= 0.3.0\",\n \"ruff ~= 0.6.4\",\n]\nextras[\"docs\"] = []\nextras[\"test_prod\"] = [\"pytest>=7.2.0,<=8.0.0\", \"pytest-xdist\", \"pytest-subtests\", \"parameterized\"]\nextras[\"test_dev\"] = [\n \"datasets\",\n \"diffusers\",\n \"evaluate\",\n \"torchdata>=0.8.0\",\n \"torchpippy>=0.2.0\",\n \"transformers\",\n \"scipy\",\n \"scikit-learn\",\n \"tqdm\",\n \"bitsandbytes\",\n \"timm\",\n]\nextras[\"testing\"] = extras[\"test_prod\"] + extras[\"test_dev\"]\nextras[\"deepspeed\"] = [\"deepspeed\"]\nextras[\"rich\"] = [\"rich\"]\n\nextras[\"test_trackers\"] = [\"wandb\", \"comet-ml\", \"tensorboard\", \"dvclive\"]\nextras[\"dev\"] = extras[\"quality\"] + extras[\"testing\"] + extras[\"rich\"]\n\nextras[\"sagemaker\"] = [\n \"sagemaker\", # boto3 is a required package in sagemaker\n]\n\nsetup(\n name=\"accelerate\",\n version=\"0.35.0.dev0\",\n description=\"Accelerate\",\n long_description=open(\"README.md\", encoding=\"utf-8\").read(),\n long_description_content_type=\"text/markdown\",\n keywords=\"deep learning\",\n license=\"Apache\",\n author=\"The HuggingFace team\",\n author_email=\"[email protected]\",\n url=\"https://github.com/huggingface/accelerate\",\n package_dir={\"\": \"src\"},\n packages=find_packages(\"src\"),\n entry_points={\n \"console_scripts\": [\n \"accelerate=accelerate.commands.accelerate_cli:main\",\n \"accelerate-config=accelerate.commands.config:main\",\n \"accelerate-estimate-memory=accelerate.commands.estimate:main\",\n \"accelerate-launch=accelerate.commands.launch:main\",\n \"accelerate-merge-weights=accelerate.commands.merge:main\",\n ]\n },\n python_requires=\">=3.8.0\",\n install_requires=[\n \"numpy>=1.17,<3.0.0\",\n \"packaging>=20.0\",\n \"psutil\",\n \"pyyaml\",\n \"torch>=1.10.0\",\n \"huggingface_hub>=0.21.0\",\n \"safetensors>=0.4.3\",\n ],\n extras_require=extras,\n classifiers=[\n \"Development Status :: 5 - Production/Stable\",\n \"Intended Audience :: Developers\",\n \"Intended Audience :: Education\",\n \"Intended Audience :: Science/Research\",\n \"License :: OSI Approved :: Apache Software License\",\n \"Operating System :: OS Independent\",\n \"Programming Language :: Python :: 3\",\n \"Programming Language :: Python :: 3.8\",\n \"Topic :: Scientific/Engineering :: Artificial Intelligence\",\n ],\n)\n\n# Release checklist\n# 1. Checkout the release branch (for a patch the current release branch, for a new minor version, create one):\n# git checkout -b vXX.xx-release\n# The -b is only necessary for creation (so remove it when doing a patch)\n# 2. Change the version in __init__.py and setup.py to the proper value.\n# 3. Commit these changes with the message: \"Release: v<VERSION>\"\n# 4. Add a tag in git to mark the release:\n# git tag v<VERSION> -m 'Adds tag v<VERSION> for pypi'\n# Push the tag and release commit to git: git push --tags origin vXX.xx-release\n# 5. Run the following commands in the top-level directory:\n# rm -rf dist\n# rm -rf build\n# python setup.py bdist_wheel\n# python setup.py sdist\n# 6. Upload the package to the pypi test server first:\n# twine upload dist/* -r testpypi\n# 7. Check that you can install it in a virtualenv by running:\n# pip install accelerate\n# pip uninstall accelerate\n# pip install -i https://testpypi.python.org/pypi accelerate\n# accelerate env\n# accelerate test\n# 8. Upload the final version to actual pypi:\n# twine upload dist/* -r pypi\n# 9. Add release notes to the tag in github once everything is looking hunky-dory.\n# 10. Go back to the main branch and update the version in __init__.py, setup.py to the new version \".dev\" and push to\n# main.\n", ".git\\hooks\\applypatch-msg.sample": "#!/bin/sh\n#\n# An example hook script to check the commit log message taken by\n# applypatch from an e-mail message.\n#\n# The hook should exit with non-zero status after issuing an\n# appropriate message if it wants to stop the commit. The hook is\n# allowed to edit the commit message file.\n#\n# To enable this hook, rename this file to \"applypatch-msg\".\n\n. git-sh-setup\ncommitmsg=\"$(git rev-parse --git-path hooks/commit-msg)\"\ntest -x \"$commitmsg\" && exec \"$commitmsg\" ${1+\"$@\"}\n:\n", ".git\\hooks\\pre-applypatch.sample": "#!/bin/sh\n#\n# An example hook script to verify what is about to be committed\n# by applypatch from an e-mail message.\n#\n# The hook should exit with non-zero status after issuing an\n# appropriate message if it wants to stop the commit.\n#\n# To enable this hook, rename this file to \"pre-applypatch\".\n\n. git-sh-setup\nprecommit=\"$(git rev-parse --git-path hooks/pre-commit)\"\ntest -x \"$precommit\" && exec \"$precommit\" ${1+\"$@\"}\n:\n", ".git\\logs\\refs\\heads\\main": "0000000000000000000000000000000000000000 4305033f8035defad0a87cd38e5c918e78510ba5 Hamza Amin <[email protected]> 1727369074 +0500\tclone: from https://github.com/huggingface/accelerate.git\n", ".git\\refs\\heads\\main": "4305033f8035defad0a87cd38e5c918e78510ba5\n", "benchmarks\\fp8\\ms_amp\\Dockerfile": "FROM ghcr.io/azure/msamp\n\nRUN pip install transformers evaluate datasets\nRUN git clone https://github.com/huggingface/accelerate\n\nRUN cd accelerate && \\\n pip install -e . && \\\n cd benchmarks/fp8\n\nCMD [\"bash\"]\n\n\n", "benchmarks\\fp8\\transformer_engine\\Dockerfile": "FROM nvcr.io/nvidia/pytorch:24.07-py3\n\nRUN pip install transformers evaluate datasets\nRUN git clone https://github.com/huggingface/accelerate.git\n\nRUN cd accelerate && \\\n pip install -e . && \\\n cd benchmarks/fp8\n\nRUN /bin/bash\n\n\n", "docker\\accelerate-cpu\\Dockerfile": "# Builds CPU-only Docker image of PyTorch\n# Uses multi-staged approach to reduce size\n# Stage 1\nFROM python:3.8-slim as compile-image\n\nARG DEBIAN_FRONTEND=noninteractive\n\nRUN apt update\nRUN apt-get install -y --no-install-recommends \\\n build-essential \\\n git \\\n gcc\n\n# Setup virtual environment for Docker\nENV VIRTUAL_ENV=/opt/venv\nRUN python3 -m venv ${VIRTUAL_ENV}\n# Make sure we use the virtualenv\nENV PATH=\"${VIRTUAL_ENV}/bin:$PATH\"\nWORKDIR /workspace\n# Install specific CPU torch wheel to save on space\nRUN python3 -m pip install --upgrade --no-cache-dir pip\nRUN python3 -m pip install --no-cache-dir \\\n jupyter \\\n git+https://github.com/huggingface/accelerate#egg=accelerate[testing,test_trackers] \\\n --extra-index-url https://download.pytorch.org/whl/cpu\n \n# Stage 2\nFROM python:3.8-slim AS build-image\nCOPY --from=compile-image /opt/venv /opt/venv\nRUN useradd -ms /bin/bash user\nUSER user\n\n# Make sure we use the virtualenv\nENV PATH=\"/opt/venv/bin:$PATH\"\nCMD [\"/bin/bash\"]", "docker\\accelerate-gpu\\Dockerfile": "# Builds GPU docker image of PyTorch specifically\n# Uses multi-staged approach to reduce size\n# Stage 1\n# Use base conda image to reduce time\nFROM continuumio/miniconda3:latest AS compile-image\n# Specify py version\nENV PYTHON_VERSION=3.9\n# Install apt libs\nRUN apt-get update && \\\n apt-get install -y curl git wget && \\\n apt-get clean && \\\n rm -rf /var/lib/apt/lists*\n\n# Create our conda env\nRUN conda create --name accelerate python=${PYTHON_VERSION} ipython jupyter pip\n# We don't install pytorch here yet since CUDA isn't available\n# instead we use the direct torch wheel\nENV PATH /opt/conda/envs/accelerate/bin:$PATH\n# Activate our bash shell\nRUN chsh -s /bin/bash\nSHELL [\"/bin/bash\", \"-c\"]\n# Activate the conda env, install mpy4pi, and install torch + accelerate\nRUN source activate accelerate && conda install -c conda-forge mpi4py\nRUN source activate accelerate && \\\n python3 -m pip install --no-cache-dir \\\n git+https://github.com/huggingface/accelerate#egg=accelerate[testing,test_trackers] \\\n --extra-index-url https://download.pytorch.org/whl/cu117\n\nRUN python3 -m pip install --no-cache-dir bitsandbytes\n\n# Stage 2\nFROM nvidia/cuda:12.1.0-cudnn8-devel-ubuntu20.04 AS build-image\nCOPY --from=compile-image /opt/conda /opt/conda\nENV PATH /opt/conda/bin:$PATH\n\n# Install apt libs\nRUN apt-get update && \\\n apt-get install -y curl git wget && \\\n apt-get clean && \\\n rm -rf /var/lib/apt/lists*\n\nRUN echo \"source activate accelerate\" >> ~/.profile\n\n# Activate the virtualenv\nCMD [\"/bin/bash\"]", "docker\\accelerate-gpu-deepspeed\\Dockerfile": "# Builds GPU docker image of PyTorch specifically\n# Uses multi-staged approach to reduce size\n# Stage 1\n# Use base conda image to reduce time\nFROM continuumio/miniconda3:latest AS compile-image\n# Specify py version\n# Note: DeepSpeed beyond v0.12.6 requires py 3.10\nENV PYTHON_VERSION=3.10\n# Install apt libs\nRUN apt-get update && \\\n apt-get install -y curl git wget && \\\n apt-get clean && \\\n rm -rf /var/lib/apt/lists*\n\n# Create our conda env\nRUN conda create --name accelerate python=${PYTHON_VERSION} ipython jupyter pip\n# We don't install pytorch here yet since CUDA isn't available\n# instead we use the direct torch wheel\nENV PATH /opt/conda/envs/accelerate/bin:$PATH\n# Activate our bash shell\nRUN chsh -s /bin/bash\nSHELL [\"/bin/bash\", \"-c\"]\n# Activate the conda env, install mpy4pi, and install torch + accelerate\nRUN source activate accelerate && conda install -c conda-forge mpi4py\nRUN source activate accelerate && \\\n python3 -m pip install --no-cache-dir \\\n git+https://github.com/huggingface/accelerate#egg=accelerate[testing,test_trackers,deepspeed] \\\n --extra-index-url https://download.pytorch.org/whl/cu117\n\nRUN python3 -m pip install --no-cache-dir bitsandbytes\n\n# Stage 2\nFROM nvidia/cuda:12.1.0-cudnn8-devel-ubuntu20.04 AS build-image\nCOPY --from=compile-image /opt/conda /opt/conda\nENV PATH /opt/conda/bin:$PATH\n\n# Install apt libs\nRUN apt-get update && \\\n apt-get install -y curl git wget && \\\n apt-get clean && \\\n rm -rf /var/lib/apt/lists*\n\nRUN echo \"source activate accelerate\" >> ~/.profile\n\n# Activate the virtualenv\nCMD [\"/bin/bash\"]", "docs\\source\\index.md": "<!--Copyright 2022 The HuggingFace Team. All rights reserved.\n\nLicensed under the Apache License, Version 2.0 (the \"License\"); you may not use this file except in compliance with\nthe License. You may obtain a copy of the License at\n\nhttp://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software distributed under the License is distributed on\nan \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the\nspecific language governing permissions and limitations under the License.\n\n\u26a0\ufe0f Note that this file is in Markdown but contain specific syntax for our doc-builder (similar to MDX) that may not be\nrendered properly in your Markdown viewer.\n-->\n\n# Accelerate\n\nAccelerate is a library that enables the same PyTorch code to be run across any distributed configuration by adding just four lines of code! In short, training and inference at scale made simple, efficient and adaptable.\n\n```diff\n+ from accelerate import Accelerator\n+ accelerator = Accelerator()\n\n+ model, optimizer, training_dataloader, scheduler = accelerator.prepare(\n+ model, optimizer, training_dataloader, scheduler\n+ )\n\n for batch in training_dataloader:\n optimizer.zero_grad()\n inputs, targets = batch\n inputs = inputs.to(device)\n targets = targets.to(device)\n outputs = model(inputs)\n loss = loss_function(outputs, targets)\n+ accelerator.backward(loss)\n optimizer.step()\n scheduler.step()\n```\n\nBuilt on `torch_xla` and `torch.distributed`, Accelerate takes care of the heavy lifting, so you don't have to write any custom code to adapt to these platforms.\nConvert existing codebases to utilize [DeepSpeed](usage_guides/deepspeed), perform [fully sharded data parallelism](usage_guides/fsdp), and have automatic support for mixed-precision training! \n\n<Tip> \n\n To get a better idea of this process, make sure to check out the [Tutorials](basic_tutorials/overview)! \n\n</Tip>\n\n\nThis code can then be launched on any system through Accelerate's CLI interface:\n```bash\naccelerate launch {my_script.py}\n```\n\n<div class=\"mt-10\">\n <div class=\"w-full flex flex-col space-y-4 md:space-y-0 md:grid md:grid-cols-2 md:gap-y-4 md:gap-x-5\">\n <a class=\"!no-underline border dark:border-gray-700 p-5 rounded-lg shadow hover:shadow-lg\" href=\"./basic_tutorials/overview\"\n ><div class=\"w-full text-center bg-gradient-to-br from-blue-400 to-blue-500 rounded-lg py-1.5 font-semibold mb-5 text-white text-lg leading-relaxed\">Tutorials</div>\n <p class=\"text-gray-700\">Learn the basics and become familiar with using Accelerate. Start here if you are using Accelerate for the first time!</p>\n </a>\n <a class=\"!no-underline border dark:border-gray-700 p-5 rounded-lg shadow hover:shadow-lg\" href=\"./usage_guides/explore\"\n ><div class=\"w-full text-center bg-gradient-to-br from-indigo-400 to-indigo-500 rounded-lg py-1.5 font-semibold mb-5 text-white text-lg leading-relaxed\">How-to guides</div>\n <p class=\"text-gray-700\">Practical guides to help you achieve a specific goal. Take a look at these guides to learn how to use Accelerate to solve real-world problems.</p>\n </a>\n <a class=\"!no-underline border dark:border-gray-700 p-5 rounded-lg shadow hover:shadow-lg\" href=\"./concept_guides/gradient_synchronization\"\n ><div class=\"w-full text-center bg-gradient-to-br from-pink-400 to-pink-500 rounded-lg py-1.5 font-semibold mb-5 text-white text-lg leading-relaxed\">Conceptual guides</div>\n <p class=\"text-gray-700\">High-level explanations for building a better understanding of important topics such as avoiding subtle nuances and pitfalls in distributed training and DeepSpeed.</p>\n </a>\n <a class=\"!no-underline border dark:border-gray-700 p-5 rounded-lg shadow hover:shadow-lg\" href=\"./package_reference/accelerator\"\n ><div class=\"w-full text-center bg-gradient-to-br from-purple-400 to-purple-500 rounded-lg py-1.5 font-semibold mb-5 text-white text-lg leading-relaxed\">Reference</div>\n <p class=\"text-gray-700\">Technical descriptions of how Accelerate classes and methods work.</p>\n </a>\n </div>\n</div>\n", "docs\\source\\package_reference\\torch_wrappers.md": "<!--Copyright 2021 The HuggingFace Team. All rights reserved.\n\nLicensed under the Apache License, Version 2.0 (the \"License\"); you may not use this file except in compliance with\nthe License. You may obtain a copy of the License at\n\nhttp://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software distributed under the License is distributed on\nan \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the\nspecific language governing permissions and limitations under the License.\n\n\u26a0\ufe0f Note that this file is in Markdown but contain specific syntax for our doc-builder (similar to MDX) that may not be\nrendered properly in your Markdown viewer.\n-->\n\n# DataLoaders, Optimizers, and Schedulers\n\nThe internal classes Accelerate uses to prepare objects for distributed training\nwhen calling [`~Accelerator.prepare`].\n\n## DataLoader utilities\n\n[[autodoc]] data_loader.prepare_data_loader\n[[autodoc]] data_loader.skip_first_batches\n\n## BatchSamplerShard\n\n[[autodoc]] data_loader.BatchSamplerShard\n\n## IterableDatasetShard\n\n[[autodoc]] data_loader.IterableDatasetShard\n\n## DataLoaderShard\n\n[[autodoc]] data_loader.DataLoaderShard\n\n## DataLoaderDispatcher\n\n[[autodoc]] data_loader.DataLoaderDispatcher\n\n## AcceleratedOptimizer\n\n[[autodoc]] optimizer.AcceleratedOptimizer\n\n## AcceleratedScheduler\n\n[[autodoc]] scheduler.AcceleratedScheduler", "examples\\requirements.txt": "accelerate # used to be installed in Amazon SageMaker environment\nevaluate\ndatasets==2.3.2\nschedulefree\nhuggingface_hub>=0.20.0\n", "examples\\inference\\pippy\\requirements.txt": "accelerate\npippy>=0.2.0"} | 1 |
action-check-commits | "{\"type\": \"directory\", \"name\": \"action-check-commits\", \"children\": [{\"type\": \"file\", \(...TRUNCATED) | "# Check Commit Messages GitHub Action\n\nA simple GitHub action that checks the list of commits in (...TRUNCATED) | "{\"index.js\": \"const got = require(\\\"got\\\");\\n\\ngot.get(\\\"https://api.github.com/repos/do(...TRUNCATED) | 2 |
AI-Canvas | "{\"type\": \"directory\", \"name\": \"AI-Canvas\", \"children\": [{\"type\": \"file\", \"name\": \"(...TRUNCATED) | "# Virtual AI Canvas with OpenCV and MediaPipe\n\n## Table of Content\n- [Overview](#overview)\n- [D(...TRUNCATED) | "{\"requirements.txt\": \"opencv-python\\nmediapipe\\nnumpy\\n\", \".git\\\\hooks\\\\applypatch-msg.(...TRUNCATED) | 0 |
alignment-handbook | "{\"type\": \"directory\", \"name\": \"alignment-handbook\", \"children\": [{\"type\": \"directory\"(...TRUNCATED) | "# Scripts to Train and Evaluate Chat Models\n\n## Fine-tuning\n\nIn the handbook, we provide three (...TRUNCATED) | "{\"setup.py\": \"# Copyright 2023 The HuggingFace Team. All rights reserved.\\n#\\n# Licensed under(...TRUNCATED) | 1 |
api-inference-community | "{\"type\": \"directory\", \"name\": \"api-inference-community\", \"children\": [{\"type\": \"file\"(...TRUNCATED) | "## Tests\n\n### Test setup\n\nThe tests require certain repositories with certain requirements to e(...TRUNCATED) | "{\"requirements.txt\": \"starlette>=0.14.2\\nnumpy>=1.18.0\\npydantic>=2\\nparameterized>=0.8.1\\np(...TRUNCATED) | 2 |
audio-transformers-course | "{\"type\": \"directory\", \"name\": \"audio-transformers-course\", \"children\": [{\"type\": \"dire(...TRUNCATED) | "# The Audio Transformers Course\n\nThis repo contains the content that's used to create [Hugging Fa(...TRUNCATED) | "{\"requirements.txt\": \"nbformat>=5.1.3\\nPyYAML>=5.4.1\\nblack>=22.3.0\", \".git\\\\hooks\\\\appl(...TRUNCATED) | 3 |
airline-management-dsa | "{\"type\": \"directory\", \"name\": \"airline-management-dsa\", \"children\": [{\"type\": \"file\",(...TRUNCATED) | "# DSA Airline Project\n\n## Overview\nThe DSA Airline Project is a C++ application designed to simu(...TRUNCATED) | "{\".git\\\\hooks\\\\applypatch-msg.sample\": \"#!/bin/sh\\n#\\n# An example hook script to check th(...TRUNCATED) | 0 |
genealogy-ai | "{\"type\": \"directory\", \"name\": \"genealogy-ai\", \"children\": [{\"type\": \"directory\", \"na(...TRUNCATED) | "<img src='genealogy_ai/static/pictures/logo.png' width=180 height='auto' alt='Genealogy AI'>\n\n# G(...TRUNCATED) | "{\".git\\\\hooks\\\\applypatch-msg.sample\": \"#!/bin/sh\\n#\\n# An example hook script to check th(...TRUNCATED) | 1 |
gradient-descent-vs-svd | "{\"type\": \"directory\", \"name\": \"gradient-descent-vs-svd\", \"children\": [{\"type\": \"file\"(...TRUNCATED) | # Gradient_Descent-vs-SVD
[Research Paper](Thesis.pdf)
| "{\".git\\\\hooks\\\\applypatch-msg.sample\": \"#!/bin/sh\\n#\\n# An example hook script to check th(...TRUNCATED) | 2 |
End of preview. Expand
in Dataset Viewer.
README.md exists but content is empty.
- Downloads last month
- 33