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

Fix uninitialized prompts bug #487

Merged
merged 4 commits into from
Mar 9, 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
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Added support for Python 3.8.
- Added code to throw an error if `output_attentions` is set to `True` in forward call to `OLMoForCausalLM`. This functionality hasn't been implemented yet.
- Fixed running with data loading workers on LUMI
- Minor bug fix: uninitialized prompts variable

### Added
- Added `output_hidden_states` argument and associated functionality to `OLMo` and `OLMoForCausalLM` to return model intermediate hidden states.
Expand Down
3 changes: 2 additions & 1 deletion olmo/eval/downstream.py
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ def __init__(
self.model_ctx_len = model_ctx_len
self.prompts = prompts
self.current_prompt = None
self.log_instances = 5 # Log the first few instances as a sanity check
self.log_instances = 0 # Set to > 0 to log the first few instances as a sanity check

self.samples: List[Dict[str, Any]] = []
dataset_names: Sequence[Optional[str]]
Expand Down Expand Up @@ -1099,6 +1099,7 @@ def __init__(
if dataset_name in cats:
dataset_names.append(name)
self.dev_set = {}
prompts: List[Union[None, str]] = [None]
if prompt_variations == 1:
prompts = [None, "inst", "inst+1", "inst+2", "inst+3", "inst+4", "inst+5"]
# Need to grab the dev set for the few-shot prompts
Expand Down
Loading