Skip to content

Commit 5eb0fe6

Browse files
Add the GGUF for Quantization
1 parent f1f37d7 commit 5eb0fe6

39 files changed

+2157
-1510
lines changed

docs/conf.py

Lines changed: 28 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -1,46 +1,47 @@
11
import os
22
import sys
3-
sys.path.insert(0, os.path.abspath('..'))
43

5-
project = 'QuantLLM'
6-
copyright = '2025, QuantLLM Team'
7-
author = 'Dark Coder'
8-
version = '1.2.0'
9-
release = '1.2.0'
4+
sys.path.insert(0, os.path.abspath(".."))
5+
6+
project = "QuantLLM"
7+
copyright = "2025, QuantLLM Team"
8+
author = "Dark Coder"
9+
version = "1.2.0"
10+
release = "1.2.0"
1011

1112
# RTD configurations
12-
on_rtd = os.environ.get('READTHEDOCS') == 'True'
13+
on_rtd = os.environ.get("READTHEDOCS") == "True"
1314

1415
extensions = [
15-
'sphinx.ext.autodoc',
16-
'sphinx.ext.napoleon',
17-
'sphinx.ext.viewcode',
18-
'sphinx.ext.intersphinx',
19-
'sphinx_autodoc_typehints',
20-
'sphinx_copybutton',
21-
'myst_parser'
16+
"sphinx.ext.autodoc",
17+
"sphinx.ext.napoleon",
18+
"sphinx.ext.viewcode",
19+
"sphinx.ext.intersphinx",
20+
"sphinx_autodoc_typehints",
21+
"sphinx_copybutton",
22+
"myst_parser",
2223
]
2324

24-
templates_path = ['_templates']
25-
exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store']
25+
templates_path = ["_templates"]
26+
exclude_patterns = ["_build", "Thumbs.db", ".DS_Store"]
2627

27-
html_theme = 'sphinx_rtd_theme'
28-
html_static_path = ['_static']
28+
html_theme = "sphinx_rtd_theme"
29+
html_static_path = ["_static"]
2930

3031
# Configure intersphinx mapping
3132
intersphinx_mapping = {
32-
'python': ('https://docs.python.org/3', None),
33-
'torch': ('https://pytorch.org/docs/stable', None),
34-
'transformers': ('https://huggingface.co/transformers/master', None),
33+
"python": ("https://docs.python.org/3", None),
34+
"torch": ("https://pytorch.org/docs/stable", None),
35+
"transformers": ("https://huggingface.co/transformers/master", None),
3536
}
3637

3738
# Autodoc configurations
3839
autodoc_default_options = {
39-
'members': True,
40-
'member-order': 'bysource',
41-
'special-members': '__init__',
42-
'undoc-members': True,
43-
'exclude-members': '__weakref__'
40+
"members": True,
41+
"member-order": "bysource",
42+
"special-members": "__init__",
43+
"undoc-members": True,
44+
"exclude-members": "__weakref__",
4445
}
4546

4647
# Napoleon settings
@@ -58,7 +59,4 @@
5859
napoleon_type_aliases = None
5960

6061
# MyST parser settings
61-
myst_enable_extensions = [
62-
"colon_fence",
63-
"deflist"
64-
]
62+
myst_enable_extensions = ["colon_fence", "deflist"]

quantllm/__init__.py

Lines changed: 9 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -1,36 +1,23 @@
1-
2-
from .data import (
3-
LoadDataset,
4-
DatasetPreprocessor,
5-
DatasetSplitter,
6-
DataLoader
7-
)
8-
from .trainer import (
9-
FineTuningTrainer,
10-
ModelEvaluator
11-
)
1+
from .data import LoadDataset, DatasetPreprocessor, DatasetSplitter, DataLoader
2+
from .trainer import FineTuningTrainer, ModelEvaluator
123
from .hub import HubManager, CheckpointManager
134
from .utils import (
145
get_optimal_training_settings,
156
configure_logging,
167
enable_logging,
17-
QuantizationBenchmark
8+
QuantizationBenchmark,
189
)
1910
from .api import QuantLLM
2011

2112
from .quant import (
22-
QuantizationConfig,
23-
QuantizationEngine,
24-
QuantizedLinear,
25-
GGUFQuantizer
13+
QuantizationConfig,
14+
QuantizationEngine,
15+
QuantizedLinear,
16+
GGUFQuantizer,
2617
)
2718

2819

29-
from .config import (
30-
ModelConfig,
31-
DatasetConfig,
32-
TrainingConfig
33-
)
20+
from .config import ModelConfig, DatasetConfig, TrainingConfig
3421

3522
# Configure package-wide logging
3623
configure_logging()
@@ -43,38 +30,31 @@
4330
__author__ = "Dark Coder"
4431

4532
__all__ = [
46-
4733
# Dataset
4834
"DataLoader",
4935
"DatasetPreprocessor",
5036
"DatasetSplitter",
5137
"LoadDataset",
52-
5338
# Training
5439
"FineTuningTrainer",
5540
"ModelEvaluator"
56-
5741
# Hub and Checkpoint
5842
"HubManager",
5943
"CheckpointManager",
60-
6144
# Configuration
6245
"ModelConfig",
6346
"DatasetConfig",
6447
"TrainingConfig",
6548
"QuantizationBenchmark",
66-
6749
# Utilities
6850
"get_optimal_training_settings",
6951
"configure_logging",
7052
"enable_logging",
71-
7253
# Quantization
7354
"QuantizationConfig",
7455
"QuantizationEngine",
7556
"QuantizedLinear",
7657
"GGUFQuantizer",
77-
7858
# API
79-
"QuantLLM"
59+
"QuantLLM",
8060
]

quantllm/api/__init__.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
11
from .high_level import QuantLLM
22

3-
all = [
4-
"QuantLLM"
5-
]
3+
all = ["QuantLLM"]

0 commit comments

Comments
 (0)