Nyuntam is NyunAI's cutting-edge toolkit for optimizing and accelerating large language models (LLMs) through state-of-the-art compression techniques. π οΈ With an integrated CLI, managing your workflows and experimenting with various compression methods has never been easier! β¨
Ready to dive in? Here's a minimal example to get you up and running with Nyuntam:
Initialize Your Workspace: ποΈ
First, set up your workspace using the nyun init command. This creates the necessary directories and configurations for your experiments.
nyun init ~/my-workspace ~/my-data --extensions text-gen
This command initializes a workspace at ~/my-workspace, sets the custom data path to ~/my-data, and installs the text-gen extension.
Run an Example Experiment: πββοΈ Now, run an example experiment using a pre-configured YAML file. For instance, to try out FLAP pruning:
nyun run examples/text-generation/flap_pruning/config.yaml
This command executes the main script using the configurations specified in the provided YAML file.
nyun) for easy workspace management and experiment execution.Install Nyuntam using pip:
pip install nyuntam
Install NVIDIA Container Toolkit (Linux):
curl -fsSL https://nvidia.github.io/libnvidia-container/gpgkey | sudo gpg --dearmor -o /usr/share/keyrings/nvidia-container-toolkit-keyring.gpg
curl -s -L https://nvidia.github.io/libnvidia-container/stable/deb/nvidia-container-toolkit.list | \
sed 's#deb https://#deb [signed-by=/usr/share/keyrings/nvidia-container-toolkit-keyring.gpg] https://#g' | \
sudo tee /etc/apt/sources.list.d/nvidia-container-toolkit.list
sudo apt-get update
sudo apt-get install -y nvidia-container-toolkit
sudo nvidia-ctk runtime configure --runtime=docker
sudo systemctl restart docker
Clone and Setup:
git clone --recursive https://github.com/nyunAI/nyuntam.git
cd nyuntam
docker pull nyunadmin/nyuntam-text-generation:latest
docker run -it -d --gpus all -v $(pwd):/workspace --name nyuntam-dev --network=host nyunadmin/nyuntam-text-generation:latest bash
Clone Repository:
git clone --recursive https://github.com/nyunAI/nyuntam.git
cd nyuntam
Setup Environment:
python3 -m venv {ENVIRONMENT_NAME}
source {ENVIRONMENT_NAME}/bin/activate
pip install -r requirements.txt
This section is for developers who want to dive deep and modify the Nyuntam codebase.
Clone the Repository:
git clone --recursive https://github.com/nyunAI/nyuntam.git
cd nyuntam
Choose Your Environment:
main.py, algorithm.py, and commands.py are located in the root directory of the nyuntam folder.nyuntam/examples directory. Each subdirectory includes a README.md for guidance and config.yaml files for configurations.nyuntam/text_generation directory.nyuntam/utils directory.Prepare Configuration:
Create a YAML file defining your experiment parameters. Example configurations are available in the nyuntam/examples directory.
Execute:
python nyuntam/main.py --yaml_path path/to/recipe.yaml
Before running experiments, initialize your workspace:
nyun init [WORKSPACE_PATH] [CUSTOM_DATA_PATH] [OPTIONS]
Options:
--overwrite, -o: Overwrite existing workspace--extensions, -e: Specify extensions to install:
text-gen: For text generationall: Install all extensionsnone: No extensionsExample:
nyun init ~/my-workspace ~/my-data --extensions text-gen
Prepare Configuration:
Create a YAML file defining your experiment parameters. Example configurations are available in the nyuntam/examples directory.
Execute:
nyun run path/to/recipe.yaml
For chained execution:
nyun run script1.yaml script2.yaml
For detailed examples and use cases, check out our examples directory, which includes:
For complete documentation, visit NyunAI Docs
Check your installed version:
nyun version
NOTE: For access to gated repositories within containers, ensure you have the necessary Hugging Face tokens configured. π
Python
99.4%
Nyuntam is NyunAI's cutting-edge toolkit for optimizing and accelerating large language models (LLMs) through state-of-the-art compression techniques. π οΈ With an integrated CLI, managing your workflows and experimenting with various compression methods has never been easier! β¨
Ready to dive in? Here's a minimal example to get you up and running with Nyuntam:
Initialize Your Workspace: ποΈ
First, set up your workspace using the nyun init command. This creates the necessary directories and configurations for your experiments.
nyun init ~/my-workspace ~/my-data --extensions text-gen
This command initializes a workspace at ~/my-workspace, sets the custom data path to ~/my-data, and installs the text-gen extension.
Run an Example Experiment: πββοΈ Now, run an example experiment using a pre-configured YAML file. For instance, to try out FLAP pruning:
nyun run examples/text-generation/flap_pruning/config.yaml
This command executes the main script using the configurations specified in the provided YAML file.
nyun) for easy workspace management and experiment execution.Install Nyuntam using pip:
pip install nyuntam
Install NVIDIA Container Toolkit (Linux):
curl -fsSL https://nvidia.github.io/libnvidia-container/gpgkey | sudo gpg --dearmor -o /usr/share/keyrings/nvidia-container-toolkit-keyring.gpg
curl -s -L https://nvidia.github.io/libnvidia-container/stable/deb/nvidia-container-toolkit.list | \
sed 's#deb https://#deb [signed-by=/usr/share/keyrings/nvidia-container-toolkit-keyring.gpg] https://#g' | \
sudo tee /etc/apt/sources.list.d/nvidia-container-toolkit.list
sudo apt-get update
sudo apt-get install -y nvidia-container-toolkit
sudo nvidia-ctk runtime configure --runtime=docker
sudo systemctl restart docker
Clone and Setup:
git clone --recursive https://github.com/nyunAI/nyuntam.git
cd nyuntam
docker pull nyunadmin/nyuntam-text-generation:latest
docker run -it -d --gpus all -v $(pwd):/workspace --name nyuntam-dev --network=host nyunadmin/nyuntam-text-generation:latest bash
Clone Repository:
git clone --recursive https://github.com/nyunAI/nyuntam.git
cd nyuntam
Setup Environment:
python3 -m venv {ENVIRONMENT_NAME}
source {ENVIRONMENT_NAME}/bin/activate
pip install -r requirements.txt
This section is for developers who want to dive deep and modify the Nyuntam codebase.
Clone the Repository:
git clone --recursive https://github.com/nyunAI/nyuntam.git
cd nyuntam
Choose Your Environment:
main.py, algorithm.py, and commands.py are located in the root directory of the nyuntam folder.nyuntam/examples directory. Each subdirectory includes a README.md for guidance and config.yaml files for configurations.nyuntam/text_generation directory.nyuntam/utils directory.Prepare Configuration:
Create a YAML file defining your experiment parameters. Example configurations are available in the nyuntam/examples directory.
Execute:
python nyuntam/main.py --yaml_path path/to/recipe.yaml
Before running experiments, initialize your workspace:
nyun init [WORKSPACE_PATH] [CUSTOM_DATA_PATH] [OPTIONS]
Options:
--overwrite, -o: Overwrite existing workspace--extensions, -e: Specify extensions to install:
text-gen: For text generationall: Install all extensionsnone: No extensionsExample:
nyun init ~/my-workspace ~/my-data --extensions text-gen
Prepare Configuration:
Create a YAML file defining your experiment parameters. Example configurations are available in the nyuntam/examples directory.
Execute:
nyun run path/to/recipe.yaml
For chained execution:
nyun run script1.yaml script2.yaml
For detailed examples and use cases, check out our examples directory, which includes:
For complete documentation, visit NyunAI Docs
Check your installed version:
nyun version
NOTE: For access to gated repositories within containers, ensure you have the necessary Hugging Face tokens configured. π
Python
99.4%