-
Notifications
You must be signed in to change notification settings - Fork 166
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add evaluation support for using lm-eval harness (#1349)
## Add evaluation support for using lm-eval harness * Added a new Evaluator to use lm_eval to evaluate hf model * Added a llama2 config to use the new evaluator ## Checklist before requesting a review - [ ] Add unit tests for this change. - [x] Make sure all tests can pass. - [ ] Update documents if necessary. - [x] Lint and apply fixes to your code by running `lintrunner -a` - [ ] Is this a user-facing change? If yes, give a description of this change to be included in the release notes. - [ ] Is this PR including examples changes? If yes, please remember to update [example documentation](https://github.com/microsoft/Olive/blob/main/docs/source/examples.md) in a follow-up PR. ## (Optional) Issue link
- Loading branch information
Showing
2 changed files
with
100 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
{ | ||
"input_model": { | ||
"type": "HfModel", | ||
"generative": true, | ||
"model_path": "meta-llama/Llama-2-7b-hf", | ||
"load_kwargs": { "attn_implementation": "eager" } | ||
}, | ||
"systems": { | ||
"local_system": { | ||
"type": "LocalSystem", | ||
"accelerators": [ { "device": "gpu", "execution_providers": [ "CUDAExecutionProvider" ] } ] | ||
} | ||
}, | ||
"evaluators": { | ||
"evaluator": { | ||
"type": "LMEvaluator", | ||
"model_class": "hf", | ||
"tasks": [ "hellaswag" ], | ||
"batch_size": 16, | ||
"limit": 0.05, | ||
"max_gen_toks": 10 | ||
} | ||
}, | ||
"auto_optimizer_config": { "opt_level": 0, "disable_auto_optimizer": true, "precision": "fp16" }, | ||
"evaluator": "evaluator", | ||
"host": "local_system", | ||
"target": "local_system", | ||
"cache_dir": "cache", | ||
"output_dir": "output" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters