File size: 3,465 Bytes
f746d7d
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
HOS Model Optimizer 安装脚本
"""

from setuptools import setup, find_packages
from pathlib import Path

# 读取 README
this_directory = Path(__file__).parent
long_description = ""
if (this_directory / "README.md").exists():
    long_description = (this_directory / "README.md").read_text(encoding="utf-8")

# 读取 requirements
def read_requirements(filename):
    """读取依赖文件"""
    requirements = []
    filepath = this_directory / filename
    if filepath.exists():
        with open(filepath, encoding="utf-8") as f:
            for line in f:
                line = line.strip()
                if line and not line.startswith("#") and not line.startswith("-"):
                    requirements.append(line)
    return requirements

setup(
    name="hos-model-optimizer",
    version="1.0.0",
    author="HOS Team",
    author_email="hos@example.com",
    description="HOS 小模型优化工具",
    long_description=long_description,
    long_description_content_type="text/markdown",
    url="https://github.com/hos-team/hos-model-optimizer",
    packages=find_packages(),
    classifiers=[
        "Development Status :: 4 - Beta",
        "Intended Audience :: Developers",
        "Intended Audience :: Science/Research",
        "License :: OSI Approved :: MIT License",
        "Operating System :: OS Independent",
        "Programming Language :: Python :: 3",
        "Programming Language :: Python :: 3.8",
        "Programming Language :: Python :: 3.9",
        "Programming Language :: Python :: 3.10",
        "Programming Language :: Python :: 3.11",
        "Topic :: Scientific/Engineering :: Artificial Intelligence",
    ],
    python_requires=">=3.8",
    install_requires=[
        "click>=8.0.0",
        "pyyaml>=6.0",
        "requests>=2.28.0",
        "psutil>=5.9.0",
        "torch>=2.0.0",
        "transformers>=4.35.0",
        "datasets>=2.14.0",
        "peft>=0.5.0",
    ],
    extras_require={
        "quantization": [
            "autoawq>=0.1.0",
            "auto-gptq>=0.5.0",
            "bitsandbytes>=0.41.0",
        ],
        "inference": [
            "llama-cpp-python>=0.2.0",
        ],
        "vllm": [
            "vllm>=0.2.0",
        ],
        "sglang": [
            "sglang>=0.1.0",
        ],
        "training": [
            "unsloth>=0.1.0",
        ],
        "dev": [
            "pytest>=7.0.0",
            "black>=23.0.0",
            "flake8>=6.0.0",
        ],
        "all": [
            "autoawq>=0.1.0",
            "auto-gptq>=0.5.0",
            "bitsandbytes>=0.41.0",
            "llama-cpp-python>=0.2.0",
            "vllm>=0.2.0",
            "sglang>=0.1.0",
            "unsloth>=0.1.0",
        ],
    },
    entry_points={
        "console_scripts": [
            "hos-quantize=hos_optimizer.cli:quantize_cmd",
            "hos-infer=hos_optimizer.cli:infer_cmd",
            "hos-train=hos_optimizer.cli:train_cmd",
            "hos-merge=hos_optimizer.cli:merge_cmd",
            "hos-deploy=hos_optimizer.cli:deploy_cmd",
            "hos-config=hos_optimizer.cli:config_cmd",
            "hos-optimizer=hos_optimizer.cli:main",
        ],
    },
    keywords="llm optimization quantization inference training deployment",
    project_urls={
        "Bug Reports": "https://github.com/hos-team/hos-model-optimizer/issues",
        "Source": "https://github.com/hos-team/hos-model-optimizer",
    },
)