• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright (c) Meta Platforms, Inc. and affiliates.
2# All rights reserved.
3#
4# This source code is licensed under the BSD-style license found in the
5# LICENSE file in the root directory of this source tree.
6
7# Example script for evaluating pre-to_edge Llama
8
9import logging
10
11import torch
12
13from .eval_llama_lib import build_args_parser, eval_llama
14
15FORMAT = "[%(levelname)s %(asctime)s %(filename)s:%(lineno)s] %(message)s"
16logging.basicConfig(level=logging.INFO, format=FORMAT)
17
18
19def main() -> None:
20    seed = 42
21    torch.manual_seed(seed)
22    modelname = "llama2"
23    parser = build_args_parser()
24    args = parser.parse_args()
25    # Overrides this arg, because evaluation requires full logits.
26    args.generate_full_logits = True
27    eval_llama(modelname, args)  # pyre-ignore
28
29
30if __name__ == "__main__":
31    main()  # pragma: no cover
32