Skip to content

Commit ef8fd43

Browse files
committed
Cleanup unused imports
1 parent 2fc131e commit ef8fd43

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

52 files changed

+37
-172
lines changed

eval/humaneval.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
44
from exllamav3 import model_init, Generator, Job, ComboSampler
55
from exllamav3.util.progress import ProgressBar
6-
import argparse, contextlib, subprocess
6+
import argparse, subprocess
77
from human_eval.data import write_jsonl, read_problems
88
from pathlib import Path
99

eval/mmlu.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,12 @@
11
from __future__ import annotations
22
import sys, os
33
sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
4-
from exllamav3 import model_init
54
from exllamav3 import model_init, Generator, Job
6-
import argparse, contextlib
5+
import argparse
76
import torch
8-
import util
97
import random, math
108
from datasets import load_dataset
11-
from exllamav3.util.file import disk_lru_cache, disk_lru_cache_clear
9+
from exllamav3.util.file import disk_lru_cache
1210
from exllamav3.util.progress import ProgressBar
1311

1412
@disk_lru_cache("get_dataset_mmlu")

eval/ppl.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,9 @@
22
sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
33

44
import argparse
5-
from exllamav3.util.file import disk_lru_cache, disk_lru_cache_clear
5+
from exllamav3.util.file import disk_lru_cache
66
from exllamav3.util.progress import ProgressBar
7-
from exllamav3.util.memory import free_mem
8-
from exllamav3 import Config, Model, Cache, Tokenizer, model_init
7+
from exllamav3 import model_init
98
from datasets import load_dataset
109
import torch
1110
import torch.nn.functional as F

eval/ppl_transformers.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@
55
from exllamav3.util.file import disk_lru_cache, disk_lru_cache_clear
66
from exllamav3.util.progress import ProgressBar
77
from exllamav3.util.memory import free_mem
8-
from exllamav3 import Config, Model, Cache, Tokenizer, model_init
9-
from transformers import AutoTokenizer, AutoModelForCausalLM
8+
from exllamav3 import Config, Tokenizer, model_init
9+
from transformers import AutoModelForCausalLM
1010
from datasets import load_dataset
1111
import torch
1212
import torch.nn.functional as F

eval/prequant_test.py

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,20 +2,17 @@
22
sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
33

44
import argparse
5-
from exllamav3.util.file import disk_lru_cache, disk_lru_cache_clear
5+
from exllamav3.util.file import disk_lru_cache
66
from exllamav3.util.progress import ProgressBar
77
from exllamav3.util.memory import free_mem
8-
from exllamav3 import Config, Model, Cache, Tokenizer, model_init
8+
from exllamav3 import Config, Model, Tokenizer
99
from exllamav3.ext import exllamav3_ext as ext
1010
from datasets import load_dataset
1111
from exllamav3.modules import Linear
12-
from exllamav3.modules.quant import LinearFP16, LinearEXL3
1312
from exllamav3.modules.quant.exl3_lib.quantize import regularize
1413
import torch
1514
import torch.nn.functional as F
1615
import math
17-
import numpy as np
18-
import termplotlib as tpl
1916

2017
# ANSI codes
2118
ESC = "\u001b"

examples/async_generator.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import sys, os
22
sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
3-
from exllamav3 import Model, Config, Cache, Tokenizer, AsyncGenerator, AsyncJob, Sampler
3+
from exllamav3 import Model, Config, Cache, Tokenizer, AsyncGenerator, AsyncJob
44
import asyncio
55

66
"""

examples/banned_strings.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
import sys, os
22
sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
33
from exllamav3 import Model, Config, Cache, Tokenizer, Generator, Job, GreedySampler
4-
from exllamav3.util import Timer
54
from common import format_prompt, get_stop_conditions
65

76
"""

examples/batched_translation.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
import argparse
44
from transformers import AutoTokenizer
55
from exllamav3.util.progress import ProgressBar
6-
from exllamav3.util.file import disk_lru_cache, disk_lru_cache_clear
7-
from exllamav3 import Config, Model, Cache, Tokenizer, model_init, Generator, Job
6+
from exllamav3.util.file import disk_lru_cache
7+
from exllamav3 import model_init, Generator, Job
88
from datasets import load_dataset
99
import torch
1010
import time

examples/chat_console.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
import sys, shutil
22

33
from rich.prompt import Prompt
4-
from rich.live import Live
54
from rich.markdown import Markdown
65
from rich.console import Console
76
from prompt_toolkit import prompt as ptk_prompt

examples/chat_util.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,5 @@
11
import re
2-
import sys
32
import pyperclip
4-
import time
5-
import os
63

74
def copy_last_codeblock(text: str, num) -> str | None:
85
pattern = re.compile(r"```[^\n`]*\n(.*?)```", re.DOTALL)

0 commit comments

Comments
 (0)