Skip to content

Commit

Permalink
Torch 2.2 - Part 2 (#979)
Browse files Browse the repository at this point in the history
  • Loading branch information
dakinggg authored Feb 15, 2024
1 parent 1ef7409 commit e0756e1
Show file tree
Hide file tree
Showing 8 changed files with 18 additions and 1,048 deletions.
4 changes: 4 additions & 0 deletions .github/workflows/pr-cpu.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,10 @@ jobs:
container: mosaicml/pytorch:2.1.0_cpu-python3.10-ubuntu20.04
markers: "not gpu"
pytest_command: "coverage run -m pytest"
- name: "cpu-2.2.0"
container: mosaicml/pytorch:2.2.0_cpu-python3.11-ubuntu20.04
markers: "not gpu"
pytest_command: "coverage run -m pytest"
name: ${{ matrix.name }}
if: github.repository_owner == 'mosaicml'
with:
Expand Down
10 changes: 10 additions & 0 deletions .github/workflows/pr-gpu.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,16 @@ jobs:
markers: "gpu"
pytest_command: "coverage run -m pytest"
deps_group: "all-flash2"
- name: "gpu-2.2.0"
container: mosaicml/pytorch:2.2.0_cu121-python3.11-ubuntu20.04
markers: "gpu"
pytest_command: "coverage run -m pytest"
deps_group: "all"
- name: "gpu-2.2.0-flash2"
container: mosaicml/llm-foundry:2.2.0_cu121_flash2-latest
markers: "gpu"
pytest_command: "coverage run -m pytest"
deps_group: "all-flash2"
name: ${{ matrix.name }}
if: github.repository_owner == 'mosaicml'
with:
Expand Down
6 changes: 3 additions & 3 deletions llmfoundry/optim/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@

from llmfoundry.optim.adaptive_lion import DecoupledAdaLRLion, DecoupledClipLion
from llmfoundry.optim.lion import DecoupledLionW
from llmfoundry.optim.lion8b import DecoupledLionW_8bit

__all__ = [
'DecoupledLionW', 'DecoupledLionW_8bit', 'DecoupledClipLion',
'DecoupledAdaLRLion'
'DecoupledLionW',
'DecoupledClipLion',
'DecoupledAdaLRLion',
]
456 changes: 0 additions & 456 deletions llmfoundry/optim/lion8b.py

This file was deleted.

4 changes: 1 addition & 3 deletions llmfoundry/utils/builders.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
ScheduledGarbageCollector)
from llmfoundry.data.dataloader import build_dataloader
from llmfoundry.optim import (DecoupledAdaLRLion, DecoupledClipLion,
DecoupledLionW, DecoupledLionW_8bit)
DecoupledLionW)
from llmfoundry.optim.scheduler import InverseSquareRootWithWarmupScheduler
from llmfoundry.tokenizers.tiktoken import TiktokenTokenizerWrapper

Expand Down Expand Up @@ -370,8 +370,6 @@ def build_optimizer(model: torch.nn.Module, name: str,
return DecoupledClipLion(params, **optimizer_config)
elif name == 'adalr_lion':
return DecoupledAdaLRLion(params, **optimizer_config)
elif name == 'decoupled_lionw_8b':
return DecoupledLionW_8bit(params, **optimizer_config)
else:
raise ValueError(f'Not sure how to build optimizer: {name}')

Expand Down
4 changes: 0 additions & 4 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -104,10 +104,6 @@
'xentropy-cuda-lib@git+https://github.com/HazyResearch/[email protected]#subdirectory=csrc/xentropy',
]

extra_deps['turbo'] = [
'mosaicml-turbo==0.0.8',
]

extra_deps['gpu-flash2'] = [
'flash-attn==2.5.0',
]
Expand Down
Loading

0 comments on commit e0756e1

Please sign in to comment.