Skip to content

Commit b95b7ce

Browse files
Fix the mirror Issue and update the Docs.
1 parent 52e1f5e commit b95b7ce

File tree

3 files changed

+12
-29
lines changed

3 files changed

+12
-29
lines changed

quantllm/__init__.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,6 @@
8888
]
8989

9090

91-
# Initialize package-level logger with fancy welcome message
92-
logger = TrainingLogger()
93-
logger.log_welcome_message()
91+
# # Initialize package-level logger with fancy welcome message
92+
# logger = TrainingLogger()
93+
# logger.log_welcome_message()

quantllm/quant/quantization_engine.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -467,7 +467,7 @@ def __init__(
467467

468468
if isinstance(model_name, str):
469469
self.model_name = model_name
470-
self.logger.log_info(f"Loading tokenizer from: {self.model_name_or_path}")
470+
self.logger.log_info(f"Loading tokenizer from: {self.model_name}")
471471
self.tokenizer = AutoTokenizer.from_pretrained(self.model_name, trust_remote_code=True)
472472

473473
self.logger.log_info(f"Loading model from: {self.model_name}")

quantllm/trainer/logger.py

Lines changed: 8 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -10,19 +10,23 @@ class LogLevel(Enum):
1010
RESET = "\033[0m" # Reset color
1111

1212
class TrainingLogger:
13+
_welcome_shown = False # Class-level flag to track if welcome message has been shown
14+
1315
def __init__(self):
14-
"""Initialize the training logger and display welcome message."""
15-
self.log_welcome_message()
16+
"""Initialize the training logger and display welcome message once."""
1617
self.start_time = datetime.datetime.now()
18+
if not TrainingLogger._welcome_shown:
19+
self.log_welcome_message()
20+
TrainingLogger._welcome_shown = True
1721

1822
def log_welcome_message(self):
19-
"""Display QuantLLM welcome message with ASCII art."""
23+
"""Display QuantLLM welcome message with ASCII art. Only shown once."""
2024
from importlib.metadata import version
2125
try:
2226
__version__ = version("quantllm")
2327
except:
2428
__version__ = "1.1.0"
25-
logo = (
29+
logo = (
2630
f"{LogLevel.INFO.value}"
2731
"╔══════════════════════════════════════════════════════════════════════════════════╗\n"
2832
"║ ║\n"
@@ -41,27 +45,6 @@ def log_welcome_message(self):
4145
f"{LogLevel.SUCCESS.value}│ 💻 Supports CUDA, CPU, and Apple Silicon │{LogLevel.RESET.value}\n"
4246
f"{LogLevel.SUCCESS.value}│ │{LogLevel.RESET.value}\n"
4347
f"{LogLevel.SUCCESS.value}╰─────────────────────────────────────────────────────────────────────────╯{LogLevel.RESET.value}\n\n"
44-
f"{LogLevel.INFO.value}📊 Supported Methods:{LogLevel.RESET.value}\n"
45-
f" {LogLevel.SUCCESS.value}• AWQ (Activation-aware Weight Quantization){LogLevel.RESET.value}\n"
46-
f" {LogLevel.SUCCESS.value}• GPTQ (Goyal-Pham-Tan Quantization){LogLevel.RESET.value}\n"
47-
f" {LogLevel.SUCCESS.value}• GGUF (GGML Universal Format){LogLevel.RESET.value}\n\n"
48-
f"{LogLevel.INFO.value}🛠️ Features:{LogLevel.RESET.value}\n"
49-
f" {LogLevel.SUCCESS.value}• Advanced 2-8 bit Quantization{LogLevel.RESET.value}\n"
50-
f" {LogLevel.SUCCESS.value}• Memory-Efficient Processing{LogLevel.RESET.value}\n"
51-
f" {LogLevel.SUCCESS.value}• LoRA & QLoRA Integration{LogLevel.RESET.value}\n"
52-
f" {LogLevel.SUCCESS.value}• Real-time Progress Tracking{LogLevel.RESET.value}\n"
53-
f" {LogLevel.SUCCESS.value}• Comprehensive Benchmarking{LogLevel.RESET.value}\n\n" f"{LogLevel.INFO.value}📚 Resources:{LogLevel.RESET.value}\n"
54-
f" {LogLevel.SUCCESS.value}• Documentation: {LogLevel.RESET.value}https://github.com/codewithdark-git/QuantLLM/wiki\n"
55-
f" {LogLevel.SUCCESS.value}• Source Code: {LogLevel.RESET.value}https://github.com/codewithdark-git/QuantLLM\n"
56-
f" {LogLevel.SUCCESS.value}• Discord: {LogLevel.RESET.value}https://discord.gg/quantllm\n"
57-
f" {LogLevel.SUCCESS.value}• Examples: {LogLevel.RESET.value}https://github.com/codewithdark-git/QuantLLM/examples\n\n"
58-
f"{LogLevel.WARNING.value}💡 Get Started:{LogLevel.RESET.value}\n"
59-
f" {LogLevel.SUCCESS.value}• Quick Start: {LogLevel.RESET.value}https://quantllm.readthedocs.io/quickstart.html\n"
60-
f" {LogLevel.SUCCESS.value}• Tutorials: {LogLevel.RESET.value}https://quantllm.readthedocs.io/tutorials/\n"
61-
f" {LogLevel.SUCCESS.value}• API Docs: {LogLevel.RESET.value}https://quantllm.readthedocs.io/api/\n\n"
62-
f"{LogLevel.SUCCESS.value}╭─ Let's optimize your LLMs! Type help() for assistance ─╮{LogLevel.RESET.value}\n"
63-
f"{LogLevel.SUCCESS.value}│ 🚀 Happy Quantizing! 🚀 │{LogLevel.RESET.value}\n"
64-
f"{LogLevel.SUCCESS.value}╰───────────────────────────────────────────────────────╯{LogLevel.RESET.value}\n"
6548
)
6649
print(logo)
6750

0 commit comments

Comments
 (0)