Skip to content

Commit

Permalink
remove more icrecream
Browse files Browse the repository at this point in the history
  • Loading branch information
eitanturok committed Sep 25, 2024
1 parent 1f025d8 commit c2d309a
Show file tree
Hide file tree
Showing 4 changed files with 0 additions and 10 deletions.
5 changes: 0 additions & 5 deletions llmfoundry/command_utils/train.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,11 +65,6 @@
log = logging.getLogger(__name__)


ic.configureOutput(includeContext=True)
install()

ic.disable()

def validate_config(train_config: TrainConfig):
"""Validates compatible model and dataloader selection."""
# Validate the rest of the config
Expand Down
1 change: 0 additions & 1 deletion llmfoundry/models/layers/blocks.py
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,6 @@ def forward(
m = self.norm_2(x)

n = self.apply_ffn(attention_mask, m)
ic(x.shape, x.device, m.shape, m.device, n.shape, n.device)
# In the following line we move the `x` tensor to the same devices as the output of ffn layer. This operation should be a no-op during training.
# This is done to fix pipeline parallel generation using hf.generate. Please see this comment for details: https://github.com/mosaicml/llm-foundry/pull/1332#issue-2386827204
x = x.to(device=n.device,
Expand Down
3 changes: 0 additions & 3 deletions llmfoundry/models/mpt/modeling_mpt.py
Original file line number Diff line number Diff line change
Expand Up @@ -966,7 +966,6 @@ def forward(
if prev_layer_key_value is not None:
extra_kwargs['prev_layer_key_value'] = prev_layer_key_value

ic(type(x), type(past_key_value), type(attn_bias), type(attention_mask))
x, attn_weights, present = block(
x,
past_key_value=past_key_value,
Expand Down Expand Up @@ -1144,7 +1143,6 @@ def forward(
use_cache if use_cache is not None else self.config.use_cache
)

ic(type(input_ids))
outputs = self.transformer(
input_ids=input_ids,
past_key_values=past_key_values,
Expand All @@ -1157,7 +1155,6 @@ def forward(
inputs_embeds=inputs_embeds,
position_ids=position_ids,
)
ic(outputs)

if self.lm_head is not None:
logits = self.lm_head(outputs.last_hidden_state)
Expand Down
1 change: 0 additions & 1 deletion llmfoundry/models/utils/tp_strategy.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ def ffn_tp_strategy(model: ComposerModel) -> dict[str, ParallelStyle]:
# generate layer plan
layer_plan: dict[str, ParallelStyle] = {}
for name, _ in model.named_modules():
ic(name)
if name.split('.')[-2:] == ['ffn', 'up_proj']:
layer_plan[name] = ColwiseParallel(
input_layouts = Replicate(),
Expand Down

0 comments on commit c2d309a

Please sign in to comment.