Skip to content

Commit

Permalink
add liger kernels
Browse files Browse the repository at this point in the history
  • Loading branch information
Малахов Алексей Павлович committed Sep 20, 2024
1 parent b98721d commit 391a917
Show file tree
Hide file tree
Showing 15 changed files with 955 additions and 52 deletions.
2 changes: 1 addition & 1 deletion turbo_alignment/cherry_picks/__init__.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
from .chat import ChatCherryPickCallback
from .classification import ClassificationCherryPickCallback
from .multimodal import MultimodalCherryPickCallback
# from .multimodal import MultimodalCherryPickCallback
from .rag import RagCherryPickCallback
from .rm import RmCherryPickCallback
12 changes: 9 additions & 3 deletions turbo_alignment/common/data/multimodal/audio/imagebind.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,16 @@
from pathlib import Path

import torch
import torchaudio
try:
import torchaudio
except:
...
from loguru import logger
from pytorchvideo.data.clip_sampling import ConstantClipsPerVideoSampler
from torchvision import transforms
try:
from pytorchvideo.data.clip_sampling import ConstantClipsPerVideoSampler
from torchvision import transforms
except:
...

from turbo_alignment.common.data.multimodal.image.base import BaseImageReader
from turbo_alignment.common.data.multimodal.registry import AudioModalityReaderRegistry
Expand Down
16 changes: 9 additions & 7 deletions turbo_alignment/common/data/multimodal/audio/whisper.py
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
from pathlib import Path
try:
import soundfile as sf
import torch
from transformers import AutoFeatureExtractor

import soundfile as sf
import torch
from transformers import AutoFeatureExtractor

from turbo_alignment.common.data.multimodal.image.base import BaseImageReader
from turbo_alignment.common.data.multimodal.registry import AudioModalityReaderRegistry
from turbo_alignment.settings.modality import ModalityReader
from turbo_alignment.common.data.multimodal.image.base import BaseImageReader
from turbo_alignment.common.data.multimodal.registry import AudioModalityReaderRegistry
from turbo_alignment.settings.modality import ModalityReader
except:
...


@AudioModalityReaderRegistry.register(ModalityReader.WHISPER)
Expand Down
15 changes: 9 additions & 6 deletions turbo_alignment/common/data/multimodal/image/imagebind.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,14 @@
from pathlib import Path

import cv2
import numpy as np
import torch
import torchvision.transforms as transforms
import torchvision.transforms.functional as F

try:
import cv2
import numpy as np
import torch
import torchvision.transforms as transforms
import torchvision.transforms.functional as F
except:
...

from turbo_alignment.common.data.multimodal.image.base import BaseImageReader
from turbo_alignment.common.data.multimodal.registry import ImageModalityReaderRegistry
from turbo_alignment.settings.modality import ModalityReader
Expand Down
Loading

0 comments on commit 391a917

Please sign in to comment.