Comments (4)
If using vLLM for inference (PyTorch model, FP16), I believe we used:
- 1 80GB A100 for 32K
- 2 80GB A100s for 128K
- 4 80GB A100s for 256K
- 8 80GB A100s for 512K
For each of the above, serving 1 model with tensor parallelism over the given number of devices. With 8 80GB A100s, I think the limit was around 650K - 700K tokens. In vLLM, it prints out the max number of tokens supported by giving the number of blocks for caches allocated, so it should be easy to tell if you're using GPUs with different amounts of memory.
For Jax, I'm not too sure what intermediate requirements were, but we needed a v4-256 to do inference on 1M tokens (full FP32 inference). I think more optimization can be made (e.g. half-precision, quantization, etc.) to make the requirements smaller. Even at full precision, the requirements seemed higher than I expected, and there might be some Jax / XLA optimizations to be made (e.g. keep it from padding certain dimensions, which we originally had a lot of trouble with).
from lwm.
Any recommendation to run the model on smaller GPUs (T4). It runs out of memory (jax).
from lwm.
@wilson1yan Can you share the shell/bash script for setting up the inference server via vLLM for PyTorch model, FP16?
If using vLLM for inference (PyTorch model, FP16), I believe we used:
* 1 80GB A100 for 32K * 2 80GB A100s for 128K * 4 80GB A100s for 256K * 8 80GB A100s for 512K
For each of the above, serving 1 model with tensor parallelism over the given number of devices. With 8 80GB A100s, I think the limit was around 650K - 700K tokens. In vLLM, it prints out the max number of tokens supported by giving the number of blocks for caches allocated, so it should be easy to tell if you're using GPUs with different amounts of memory.
For Jax, I'm not too sure what intermediate requirements were, but we needed a v4-256 to do inference on 1M tokens (full FP32 inference). I think more optimization can be made (e.g. half-precision, quantization, etc.) to make the requirements smaller. Even at full precision, the requirements seemed higher than I expected, and there might be some Jax / XLA optimizations to be made (e.g. keep it from padding certain dimensions, which we originally had a lot of trouble with).
from lwm.
Iโm thinking an attention kernel optimization like top-k would be appropriate here. Could a user calculate their own position_ids and pass a subset of the tokens, maybe make multiple passes and drop tokens that donโt impact the results?
from lwm.
Related Issues (20)
- error when run run_sample_img.sh HOT 1
- NCCL Error when running the Jax LWM-Chat-32K-Jax HOT 1
- We need API
- How to set the input length parameter to support long context window e.g. 256k inputs? HOT 1
- Example Data for vision language training (What is the format?) HOT 1
- ValueError: bytes is too large when running scripts/run_train_text.sh HOT 1
- LlamaForCausalLM requires the PyTorch library but it was not found in your environment HOT 1
- `model_max_length` why is it 2048? HOT 1
- When will you support text to video in pytorch?
- Getting memory error while running run_vision.sh
- run run_samle_image.sh error
- run run_sample_video.sh config
- pytorch model & ring attention HOT 4
- How to setup conversation with vision chat? HOT 1
- Does support text to image and video geneation training ?
- Request for publicizing the LWM-1K/8K JAX or PyTorch model
- AttributeError: module 'jax.numpy' has no attribute 'DeviceArray' when run sample_video.sh
- RESOURCE_EXHAUSTED: XLA:TPU compile permanent
- DP FSDP & SP
- ValueError: Incompatible shapes for broadcasting: (2, 1, 1, 526464) and requested shape (2, 1, 32768, 32768) HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. ๐๐๐
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google โค๏ธ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from lwm.