Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

use llm-foundry for ICL metrics #287

Merged
merged 8 commits into from
Jul 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 5 additions & 6 deletions open_lm/utils/llm_foundry_wrapper.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,14 @@
"""Implements a Hugging Causal LM wrapped inside a :class:`.ComposerModel`."""

from typing import Mapping, Union

from composer.metrics.nlp import (
from llmfoundry.eval.metrics.nlp import (
InContextLearningLMAccuracy,
InContextLearningLMExpectedCalibrationError,
InContextLearningMCExpectedCalibrationError,
InContextLearningMultipleChoiceAccuracy,
InContextLearningQAAccuracy,
InContextLearningCodeEvalAccuracy,
InContextLearningGenerationExactMatchAccuracy,
)
from composer.metrics.nlp import (
LanguageCrossEntropy,
LanguagePerplexity,
)
Expand All @@ -33,10 +33,9 @@
LanguagePerplexity(),
InContextLearningLMAccuracy(),
InContextLearningMultipleChoiceAccuracy(),
InContextLearningQAAccuracy(),
InContextLearningGenerationExactMatchAccuracy(),
InContextLearningLMExpectedCalibrationError(),
InContextLearningMCExpectedCalibrationError(),
InContextLearningCodeEvalAccuracy(),
]


Expand Down
2 changes: 1 addition & 1 deletion requirements_test.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ pytest-cov==3.0.0
pytest-xdist==2.5.0
pytest==7.0.1
tensorboard==2.14.1
llm-foundry==0.7.0
llm-foundry==0.9.0
Loading