[Misc] Standardize RoPE handling for Qwen2-VL (#9250)

This commit is contained in:
Cyrus Leung
2024-10-16 13:56:17 +08:00
committed by GitHub
parent ed920135c8
commit 7e7eae338d
16 changed files with 102 additions and 200 deletions

View File

@@ -454,11 +454,12 @@ class EngineArgs:
'None, we assume the model weights are not '
'quantized and use `dtype` to determine the data '
'type of the weights.')
parser.add_argument('--rope-scaling',
default=None,
type=json.loads,
help='RoPE scaling configuration in JSON format. '
'For example, {"type":"dynamic","factor":2.0}')
parser.add_argument(
'--rope-scaling',
default=None,
type=json.loads,
help='RoPE scaling configuration in JSON format. '
'For example, {"rope_type":"dynamic","factor":2.0}')
parser.add_argument('--rope-theta',
default=None,
type=float,