Skip to content

Commit 9bb92ef

Browse files
ysharma1126achalddavejmercatsedrick-keh-tri
authored
use llm-foundry for ICL metrics (mlfoundations#287)
* use llm-foundry for ICL metrics * replaced InContextLearningQAAccuracy with InContextLearningGenerationExactMatchAccuracy, and removed the commented line for code evals * resolve lint check * Update requirements_test.txt * Update requirements_test.txt --------- Co-authored-by: Achal Dave <[email protected]> Co-authored-by: jmercat <[email protected]> Co-authored-by: sedrick-keh-tri <[email protected]>
1 parent c0f1319 commit 9bb92ef

File tree

2 files changed

+6
-7
lines changed

2 files changed

+6
-7
lines changed

open_lm/utils/llm_foundry_wrapper.py

+5-6
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,14 @@
44
"""Implements a Hugging Causal LM wrapped inside a :class:`.ComposerModel`."""
55

66
from typing import Mapping, Union
7-
8-
from composer.metrics.nlp import (
7+
from llmfoundry.eval.metrics.nlp import (
98
InContextLearningLMAccuracy,
109
InContextLearningLMExpectedCalibrationError,
1110
InContextLearningMCExpectedCalibrationError,
1211
InContextLearningMultipleChoiceAccuracy,
13-
InContextLearningQAAccuracy,
14-
InContextLearningCodeEvalAccuracy,
12+
InContextLearningGenerationExactMatchAccuracy,
13+
)
14+
from composer.metrics.nlp import (
1515
LanguageCrossEntropy,
1616
LanguagePerplexity,
1717
)
@@ -33,10 +33,9 @@
3333
LanguagePerplexity(),
3434
InContextLearningLMAccuracy(),
3535
InContextLearningMultipleChoiceAccuracy(),
36-
InContextLearningQAAccuracy(),
36+
InContextLearningGenerationExactMatchAccuracy(),
3737
InContextLearningLMExpectedCalibrationError(),
3838
InContextLearningMCExpectedCalibrationError(),
39-
InContextLearningCodeEvalAccuracy(),
4039
]
4140

4241

requirements_test.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,4 @@ pytest-cov==3.0.0
33
pytest-xdist==2.5.0
44
pytest==7.0.1
55
tensorboard==2.14.1
6-
llm-foundry==0.7.0
6+
llm-foundry==0.9.0

0 commit comments

Comments
 (0)