-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
c6273a2
commit 501b2b5
Showing
31 changed files
with
251 additions
and
202 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
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,14 @@ | ||
FROM nvcr.io/nvidia/pytorch:24.02-py3 | ||
|
||
WORKDIR /app | ||
COPY ./requirements.txt /app | ||
|
||
RUN apt-get update && apt-get install | ||
RUN apt-get install -y libpq-dev | ||
|
||
RUN pip install -r requirements.txt | ||
RUN pip uninstall -y flash-attn | ||
RUN pip install flash-attn==2.5.8 | ||
|
||
WORKDIR /leaderboard_eval | ||
ENTRYPOINT ["python", "eval.py"] |
Empty file.
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
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,19 @@ | ||
services: | ||
leaderboard: | ||
image: leaderboard_eval:latest | ||
volumes: | ||
- /home/m.vyrodov/leaderboards/backend:/leaderboard_eval | ||
stdin_open: true | ||
tty: true | ||
environment: | ||
POSTGRES_IP: ${POSTGRES_IP} | ||
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD} | ||
POSTGRES_USER: ${POSTGRES_USER} | ||
POSTGRES_DB: ${POSTGRES_DB} | ||
deploy: | ||
resources: | ||
reservations: | ||
devices: | ||
- driver: nvidia | ||
count: all | ||
capabilities: [gpu] |
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,24 @@ | ||
import json | ||
|
||
from lm_eval import evaluator | ||
from lm_eval.models.huggingface import HFLM | ||
|
||
from goat.backend.add_results import add_results | ||
from goat.utils.database_helper import DatabaseHelper | ||
|
||
|
||
def eval(model_name: str, precision: str): | ||
lm = HFLM(pretrained=model_name, dtype=precision) | ||
taskname = "goat" | ||
results = evaluator.simple_evaluate(model=lm, tasks=[taskname]) | ||
|
||
filename = model_name.replace("/", "__") | ||
with open(f"results/{filename}.json", "w", encoding="utf-8") as f: | ||
json.dump(results, f, ensure_ascii=False) | ||
|
||
add_results(input_path=f"results/{filename}.json") | ||
|
||
|
||
if __name__ == "__main__": | ||
db_helper = DatabaseHelper() | ||
db_helper.listen_to_new_requests(eval) |
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,9 @@ | ||
flash-attn==2.5.8 | ||
lm_eval @ git+https://github.com/deepvk/lm-evaluation-harness@goat | ||
psycopg2==2.9.9 | ||
SQLAlchemy==2.0.29 | ||
torch==2.2.0 | ||
torchdata==0.7.1 | ||
torchtext==0.17.0 | ||
torchvision==0.17.0 | ||
transformer_engine==0.0.0 |
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,38 @@ | ||
create table if not exists public.leaderboard | ||
( | ||
model varchar not null | ||
primary key, | ||
single_choice double precision, | ||
multiple_choice double precision, | ||
word_gen double precision | ||
); | ||
|
||
alter table public.leaderboard | ||
owner to habrpguser; | ||
|
||
create table if not exists public.eval_requests | ||
( | ||
id serial | ||
constraint eval_requests_pk | ||
primary key, | ||
model_name varchar not null, | ||
precision varchar not null | ||
); | ||
|
||
alter table public.eval_requests | ||
owner to habrpguser; | ||
|
||
alter table public.eval_requests | ||
owner to habrpguser; | ||
|
||
create or replace function notify_id_trigger() | ||
returns trigger as $$ | ||
begin | ||
perform pg_notify('id'::text, NEW."id"::text); | ||
return new; | ||
end; | ||
$$ language plpgsql; | ||
|
||
create trigger trigger1 | ||
after insert or update on public."eval_requests" | ||
for each row execute procedure notify_id_trigger(); |
Empty file.
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
File renamed without changes.
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,3 @@ | ||
gradio==4.31.3 | ||
psycopg2==2.9.9 | ||
SQLAlchemy==2.0.29 |
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
Empty file.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
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
File renamed without changes.
File renamed without changes.
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
Empty file.
Oops, something went wrong.