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

Load model in the target export precision by default in PTQ #10267

Merged
merged 2 commits into from
Aug 27, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions examples/nlp/language_modeling/conf/megatron_gpt_ptq.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,15 @@ trainer:
num_nodes: 1
accelerator: gpu
logger: false # logger provided by exp_manager
precision: bf16 # 16, 32, or bf16
precision: ${export.dtype} # 16, bf16, or 32
enable_checkpointing: false

model:
tensor_model_parallel_size: 1
pipeline_model_parallel_size: 1
restore_from_path: llama2-7b-fp16.nemo # Nemo file path
precision: ${export.dtype} # Model weights data type
megatron_amp_O2: true # Enable Megatron O2-style half-precision

## Activation Checkpoint
activations_checkpoint_granularity: null # 'selective' or 'full'
Expand All @@ -42,7 +44,7 @@ export:
decoder_type: llama # gptnext, gpt2, llama
inference_tensor_parallel: 1 # Default using 1 TP for inference
inference_pipeline_parallel: 1 # Default using 1 PP for inference
dtype: ${trainer.precision} # Default precision data type
dtype: 16 # Default precision data type for non-quantized layers: 16 or bf16
save_path: llama2-7b-${quantization.algorithm}.qnemo # Path where the quantized model will be saved
compress: false # Whether save_path should be a tarball or a directory
sample_output: true # Whether to run a sample prompt before saving
Loading