Skip to content

Commit

Permalink
lint
Browse files Browse the repository at this point in the history
  • Loading branch information
mvpatel2000 committed Oct 2, 2023
1 parent 58fc9d1 commit 256bb01
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
3 changes: 2 additions & 1 deletion llmfoundry/models/hf/hf_causal_lm.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,8 @@ def __init__(self, om_model_config: Union[DictConfig,
tokenizer: PreTrainedTokenizerBase):
# set up training and eval metrics
use_train_metrics = om_model_config.get('use_train_metrics', True)
train_metrics = [LanguageCrossEntropy(), LanguagePerplexity()] if use_train_metrics else []
train_metrics = [LanguageCrossEntropy(),
LanguagePerplexity()] if use_train_metrics else []
eval_metrics = [
LanguageCrossEntropy(),
LanguagePerplexity(),
Expand Down
6 changes: 4 additions & 2 deletions llmfoundry/models/mpt/modeling_mpt.py
Original file line number Diff line number Diff line change
Expand Up @@ -694,8 +694,10 @@ def __init__(
hf_config = MPTConfig.from_dict(resolved_om_model_config)
model = MPTForCausalLM(hf_config)

use_train_metrics = resolved_om_model_config.get('use_train_metrics', True)
train_metrics = [LanguageCrossEntropy(), LanguagePerplexity()] if use_train_metrics else []
use_train_metrics = resolved_om_model_config.get(
'use_train_metrics', True)
train_metrics = [LanguageCrossEntropy(),
LanguagePerplexity()] if use_train_metrics else []
eval_metrics = [
LanguageCrossEntropy(),
LanguagePerplexity(),
Expand Down

0 comments on commit 256bb01

Please sign in to comment.