Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Will a fast version be released like segment-anything-fast? #112

Open
yatengLG opened this issue Dec 13, 2023 · 3 comments
Open

Will a fast version be released like segment-anything-fast? #112

yatengLG opened this issue Dec 13, 2023 · 3 comments

Comments

@yatengLG
Copy link

Hello, i'm the contributor of project ISAT. Your project sam-hq give me more help, it's a great work.

The pytorch-labs has recently released a new project segment-anything-fast, this version is faster than SAM. Will you release a faster version of sam-hq?

@lkeab
Copy link
Collaborator

lkeab commented Dec 14, 2023

@yatengLG
Copy link
Author

That's not my means.I know sam-hq-tiny. This is a light model.

I am currently learning some new features of PyTorch 2.0.
This project segment-anything-fast is released by pytorch-labs to show these features of pytorch2.0. This project use some techniques that reduce forward time cost and memory without changing the model structure and without retraining.

under lines are copy from pytorch-labs:

As announced during the PyTorch Developer Conference 2023, the PyTorch team rewrote Meta’s Segment Anything (“SAM”) Model resulting in 8x faster code than the original implementation, with no loss of accuracy, all using native PyTorch optimizations. We leverage a breadth of new PyTorch features:

  • [Torch.compile(https://pytorch.org/tutorials/intermediate/torch_compile_tutorial.html): A compiler for PyTorch models
  • GPU quantization: Accelerate models with reduced precision operations
  • Scaled Dot Product Attention (SDPA): Memory efficient attention implementations
  • Semi-Structured (2:4) Sparsity: A GPU optimized sparse memory format
  • Nested Tensor: Batch together non-uniformly sized data into a single Tensor, such as images of different sizes.
  • Custom operators with Triton: Write GPU operations using Triton Python DSL and easily integrate it into PyTorch’s various components with custom operator registration.

Maybe this project is more focused on engineering projects rather than academic research, so I'm not sure if you're interested in this.

@azulika
Copy link

azulika commented Feb 29, 2024

any update on this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants