-
Notifications
You must be signed in to change notification settings - Fork 86
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
Support NeMo NeVA Model #343
Comments
Can you share the script for the |
@athitten when you have a minute |
Adding the updated command to use python3 ./examples/multimodal/multimodal_llm/neva/neva_pretrain.py trainer.precision=bf16-mixed model.megatron_amp_O2=True model.mcore_gpt=True trainer.num_nodes=1 trainer.devices=1 trainer.val_check_interval=10 trainer.limit_val_batches=5 trainer.log_every_n_steps=1 ++exp_manager.max_time_per_run=00:00:03:00 trainer.max_steps=20 model.micro_batch_size=2 model.global_batch_size=4 model.tensor_model_parallel_size=1 model.pipeline_model_parallel_size=1 exp_manager.create_checkpoint_callback=False model.data.data_path=./data/multimodal/tiny-neva/dummy.json model.data.image_folder=./data/multimodal/tiny-neva/images model.tokenizer.library=sentencepiece model.tokenizer.model=./data/multimodal/tiny-neva/tokenizer_add_special.model model.num_layers=2 model.hidden_size=5120 model.ffn_hidden_size=13824 model.num_attention_heads=40 model.normalization=rmsnorm model.data.num_workers=0 model.data.conv_template=llama_2 model.mm_cfg.vision_encoder.from_pretrained=openai/clip-vit-large-patch14 model.mm_cfg.llm.from_pretrained=null model.use_flash_attention=false exp_manager.exp_dir=./foo-neva-train |
This might be helpful: The full config with default values for all parameters can be found: here. Only the parameters we specify in the run command get overwritten by the specified values and others default to values mentioned in the config. |
Yes its important to prioritize getting thunder working with |
🚀 Feature
NeMo's NeVa (LLaVa) is a multimodal language model
Initial
examine
:Found 49 distinct operations, of which 39 (79.6%) are supported
Work items
torch.where(condition)
with thunder.jit #124TypeError: expected 2 arguments, got 1
in megatron transformer #858WrappedValue
in args #891flash_attn_with_kvcache
#1004Running the model
Required data
First download the freely available data and place it in a
data
directory.NeMo installation
Dependencies
NeMo branch
To keep the whole thunder team on the same NeMo revisions, and to prevent having a bunch of "modify file to call
thunder.jit()
" instructions, we temporarily maintain our own branch for thunder. You can grab it by cloninghttps://github.com/tfogal/NeMo.git
. Make sure you have checked out thetfogal/thunder-nemo
branch.To install NeMo, run
python3 -m pip install -e .
from the root of the checked-out directory.Running the network
Note that the latest version of the
tfogal/thunder-nemo
branch allows running with dynamo+thunder by settingNEMO_THUNDER_NEVA=dynamo
.cc @apaz-cli @tfogal
The text was updated successfully, but these errors were encountered: