Skip to content

Commit

Permalink
format
Browse files Browse the repository at this point in the history
  • Loading branch information
zsw256 committed Apr 10, 2024
1 parent 7fa2101 commit 9f63ab6
Showing 1 changed file with 7 additions and 9 deletions.
16 changes: 7 additions & 9 deletions projects/Eval_LLM/eval_harness.py
Original file line number Diff line number Diff line change
@@ -1,27 +1,25 @@
import os
import oneflow as flow

import json
import os
from pathlib import Path
from typing import Dict, List, Optional, TypeVar

import oneflow as flow
import oneflow.nn.functional as F

flow.mock_torch.enable(lazy=True)

import oneflow as torch
from lm_eval import evaluator, tasks, utils # noqa
from lm_eval.api.model import LM # noqa
from lm_eval.models.utils import chunks # noqa
from tqdm import tqdm

import libai.utils.distributed as dist # noqa

os.environ["TOKENIZERS_PARALLELISM"] = "false"
flow.mock_torch.enable(lazy=True)
import oneflow as torch


T = TypeVar("T")




class EvalHarnessBase(LM):
def __init__(self, model, tokenizer, model_name, batch_size: int, cfg: dict):
super().__init__()
Expand Down

0 comments on commit 9f63ab6

Please sign in to comment.