Spaces:
Paused
Paused
AurelioAguirre
commited on
Commit
Β·
9ad1b29
1
Parent(s):
8af549e
mooved folders
Browse files- .idea/misc.xml +1 -1
- Dockerfile +0 -1
- main/api.py +1 -1
- main/app.py +1 -1
- main/config.yaml +5 -5
- main/routes.py +3 -3
- {utils β main/utils}/__init__.py +0 -0
- {utils β main/utils}/errors.py +0 -0
- {utils β main/utils}/helpers.py +0 -0
- {utils β main/utils}/logging.py +0 -0
- {utils β main/utils}/validation.py +0 -0
.idea/misc.xml
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
<component name="Black">
|
4 |
<option name="sdkName" value="Python 3.12 (LLM-Engine)" />
|
5 |
</component>
|
6 |
-
<component name="ProjectRootManager" version="2" languageLevel="JDK_21" default="true" project-jdk-name="Python 3.12 (
|
7 |
<output url="file://$PROJECT_DIR$/out" />
|
8 |
</component>
|
9 |
</project>
|
|
|
3 |
<component name="Black">
|
4 |
<option name="sdkName" value="Python 3.12 (LLM-Engine)" />
|
5 |
</component>
|
6 |
+
<component name="ProjectRootManager" version="2" languageLevel="JDK_21" default="true" project-jdk-name="Python 3.12 (LLMServer)" project-jdk-type="Python SDK">
|
7 |
<output url="file://$PROJECT_DIR$/out" />
|
8 |
</component>
|
9 |
</project>
|
Dockerfile
CHANGED
@@ -13,7 +13,6 @@ RUN pip install --no-cache-dir --upgrade -r requirements.txt
|
|
13 |
|
14 |
COPY --chown=user . /app
|
15 |
COPY --chown=user main $HOME/app/main
|
16 |
-
COPY --chown=user utils $HOME/app/utils
|
17 |
|
18 |
CMD ["uvicorn", "main.app:app", "--host", "0.0.0.0", "--port", "7860"]
|
19 |
|
|
|
13 |
|
14 |
COPY --chown=user . /app
|
15 |
COPY --chown=user main $HOME/app/main
|
|
|
16 |
|
17 |
CMD ["uvicorn", "main.app:app", "--host", "0.0.0.0", "--port", "7860"]
|
18 |
|
main/api.py
CHANGED
@@ -4,7 +4,7 @@ from threading import Thread
|
|
4 |
import torch
|
5 |
from typing import Optional, Iterator, List
|
6 |
from transformers import AutoModelForCausalLM, AutoTokenizer, TextIteratorStreamer
|
7 |
-
from utils.logging import setup_logger
|
8 |
|
9 |
class LLMApi:
|
10 |
def __init__(self, config: dict):
|
|
|
4 |
import torch
|
5 |
from typing import Optional, Iterator, List
|
6 |
from transformers import AutoModelForCausalLM, AutoTokenizer, TextIteratorStreamer
|
7 |
+
from .utils.logging import setup_logger
|
8 |
|
9 |
class LLMApi:
|
10 |
def __init__(self, config: dict):
|
main/app.py
CHANGED
@@ -5,7 +5,7 @@ from fastapi.middleware.cors import CORSMiddleware
|
|
5 |
import uvicorn
|
6 |
from .api import LLMApi
|
7 |
from .routes import router, init_router
|
8 |
-
from utils.logging import setup_logger
|
9 |
from huggingface_hub import login
|
10 |
from pathlib import Path
|
11 |
from dotenv import load_dotenv
|
|
|
5 |
import uvicorn
|
6 |
from .api import LLMApi
|
7 |
from .routes import router, init_router
|
8 |
+
from .utils.logging import setup_logger
|
9 |
from huggingface_hub import login
|
10 |
from pathlib import Path
|
11 |
from dotenv import load_dotenv
|
main/config.yaml
CHANGED
@@ -10,13 +10,13 @@ model:
|
|
10 |
temperature: 0.7
|
11 |
repetition_penalty: 1.1
|
12 |
defaults:
|
13 |
-
|
14 |
-
model_name: "huihui-ai/Qwen2.5-Coder-32B-Instruct-abliterated"
|
15 |
|
16 |
folders:
|
17 |
-
models: "models"
|
18 |
-
cache: "
|
19 |
-
logs: "logs"
|
20 |
|
21 |
logging:
|
22 |
level: "INFO"
|
|
|
10 |
temperature: 0.7
|
11 |
repetition_penalty: 1.1
|
12 |
defaults:
|
13 |
+
model_name: "huihui-ai/Llama-3.2-3B-Instruct-abliterated"
|
14 |
+
#model_name: "huihui-ai/Qwen2.5-Coder-32B-Instruct-abliterated"
|
15 |
|
16 |
folders:
|
17 |
+
models: "main/models"
|
18 |
+
cache: "main/.cache"
|
19 |
+
logs: "main/logs"
|
20 |
|
21 |
logging:
|
22 |
level: "INFO"
|
main/routes.py
CHANGED
@@ -2,9 +2,9 @@ from fastapi import APIRouter, HTTPException
|
|
2 |
from pydantic import BaseModel
|
3 |
from typing import Optional, List, Dict, Union
|
4 |
from .api import LLMApi
|
5 |
-
from utils.logging import setup_logger
|
6 |
-
from utils.helpers import get_system_info, format_memory_size
|
7 |
-
from utils.validation import validate_model_path
|
8 |
import psutil
|
9 |
from pathlib import Path
|
10 |
|
|
|
2 |
from pydantic import BaseModel
|
3 |
from typing import Optional, List, Dict, Union
|
4 |
from .api import LLMApi
|
5 |
+
from .utils.logging import setup_logger
|
6 |
+
from .utils.helpers import get_system_info, format_memory_size
|
7 |
+
from .utils.validation import validate_model_path
|
8 |
import psutil
|
9 |
from pathlib import Path
|
10 |
|
{utils β main/utils}/__init__.py
RENAMED
File without changes
|
{utils β main/utils}/errors.py
RENAMED
File without changes
|
{utils β main/utils}/helpers.py
RENAMED
File without changes
|
{utils β main/utils}/logging.py
RENAMED
File without changes
|
{utils β main/utils}/validation.py
RENAMED
File without changes
|