We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 14a2081 commit c8c8ebdCopy full SHA for c8c8ebd
1 file changed
src/parallax/sglang/model_runner.py
100755
100644
@@ -349,8 +349,13 @@ def initialize_sgl_model_runner(
349
dtype=dtype,
350
quantization=quant_method,
351
)
352
- # TODO: Fix me
353
- model_config.hf_config.tie_word_embeddings = False
+ # Only disable tie_word_embeddings when running a partial layer range
+ # (multi-node PP where this node doesn't have both embed_tokens and lm_head).
354
+ # For single-node or full-range runs, keep the original setting so that
355
+ # lm_head correctly shares weights with embed_tokens.
356
+ num_hidden_layers = model_config.hf_config.num_hidden_layers
357
+ if start_layer > 0 or end_layer < num_hidden_layers:
358
+ model_config.hf_config.tie_word_embeddings = False
359
model_config.hf_config.start_layer = start_layer
360
model_config.hf_config.end_layer = end_layer
361
0 commit comments