Kevin Hu
commited on
Commit
·
84758ca
1
Parent(s):
2b1ed01
Add Llama3.3 (#4174)
Browse files### What problem does this PR solve?
#4168
### Type of change
- [x] New Feature (non-breaking change which adds functionality)
- conf/llm_factories.json +12 -0
- deepdoc/vision/recognizer.py +3 -2
- rag/utils/s3_conn.py +0 -1
conf/llm_factories.json
CHANGED
@@ -1014,6 +1014,18 @@
|
|
1014 |
"max_tokens": 131072,
|
1015 |
"model_type": "chat"
|
1016 |
},
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1017 |
{
|
1018 |
"llm_name": "mixtral-8x7b-32768",
|
1019 |
"tags": "LLM,CHAT,5k",
|
|
|
1014 |
"max_tokens": 131072,
|
1015 |
"model_type": "chat"
|
1016 |
},
|
1017 |
+
{
|
1018 |
+
"llm_name": "llama-3.3-70b-versatile",
|
1019 |
+
"tags": "LLM,CHAT,128k",
|
1020 |
+
"max_tokens": 128000,
|
1021 |
+
"model_type": "chat"
|
1022 |
+
},
|
1023 |
+
{
|
1024 |
+
"llm_name": "llama-3.3-70b-specdec",
|
1025 |
+
"tags": "LLM,CHAT,8k",
|
1026 |
+
"max_tokens": 8192,
|
1027 |
+
"model_type": "chat"
|
1028 |
+
},
|
1029 |
{
|
1030 |
"llm_name": "mixtral-8x7b-32768",
|
1031 |
"tags": "LLM,CHAT,5k",
|
deepdoc/vision/recognizer.py
CHANGED
@@ -26,6 +26,7 @@ from api.utils.file_utils import get_project_base_directory
|
|
26 |
from .operators import * # noqa: F403
|
27 |
from .operators import preprocess
|
28 |
|
|
|
29 |
class Recognizer(object):
|
30 |
def __init__(self, label_list, task_name, model_dir=None):
|
31 |
"""
|
@@ -144,11 +145,11 @@ class Recognizer(object):
|
|
144 |
return 0
|
145 |
x0_ = max(b["x0"], x0)
|
146 |
x1_ = min(b["x1"], x1)
|
147 |
-
assert x0_ <= x1_, "
|
148 |
tp, btm, x0, x1, b)
|
149 |
tp_ = max(b["top"], tp)
|
150 |
btm_ = min(b["bottom"], btm)
|
151 |
-
assert tp_ <= btm_, "
|
152 |
tp, btm, x0, x1, b)
|
153 |
ov = (btm_ - tp_) * (x1_ - x0_) if x1 - \
|
154 |
x0 != 0 and btm - tp != 0 else 0
|
|
|
26 |
from .operators import * # noqa: F403
|
27 |
from .operators import preprocess
|
28 |
|
29 |
+
|
30 |
class Recognizer(object):
|
31 |
def __init__(self, label_list, task_name, model_dir=None):
|
32 |
"""
|
|
|
145 |
return 0
|
146 |
x0_ = max(b["x0"], x0)
|
147 |
x1_ = min(b["x1"], x1)
|
148 |
+
assert x0_ <= x1_, "Bbox mismatch! T:{},B:{},X0:{},X1:{} ==> {}".format(
|
149 |
tp, btm, x0, x1, b)
|
150 |
tp_ = max(b["top"], tp)
|
151 |
btm_ = min(b["bottom"], btm)
|
152 |
+
assert tp_ <= btm_, "Bbox mismatch! T:{},B:{},X0:{},X1:{} => {}".format(
|
153 |
tp, btm, x0, x1, b)
|
154 |
ov = (btm_ - tp_) * (x1_ - x0_) if x1 - \
|
155 |
x0 != 0 and btm - tp != 0 else 0
|
rag/utils/s3_conn.py
CHANGED
@@ -1,6 +1,5 @@
|
|
1 |
import logging
|
2 |
import boto3
|
3 |
-
import os
|
4 |
from botocore.exceptions import ClientError
|
5 |
from botocore.client import Config
|
6 |
import time
|
|
|
1 |
import logging
|
2 |
import boto3
|
|
|
3 |
from botocore.exceptions import ClientError
|
4 |
from botocore.client import Config
|
5 |
import time
|