浏览代码

Add Llama3.3 (#4174)

### What problem does this PR solve?

#4168

### Type of change

- [x] New Feature (non-breaking change which adds functionality)
tags/v0.15.1
Kevin Hu 10 个月前
父节点
当前提交
2cbe064080
没有帐户链接到提交者的电子邮件
共有 3 个文件被更改,包括 15 次插入3 次删除
  1. 12
    0
      conf/llm_factories.json
  2. 3
    2
      deepdoc/vision/recognizer.py
  3. 0
    1
      rag/utils/s3_conn.py

+ 12
- 0
conf/llm_factories.json 查看文件

"max_tokens": 131072, "max_tokens": 131072,
"model_type": "chat" "model_type": "chat"
}, },
{
"llm_name": "llama-3.3-70b-versatile",
"tags": "LLM,CHAT,128k",
"max_tokens": 128000,
"model_type": "chat"
},
{
"llm_name": "llama-3.3-70b-specdec",
"tags": "LLM,CHAT,8k",
"max_tokens": 8192,
"model_type": "chat"
},
{ {
"llm_name": "mixtral-8x7b-32768", "llm_name": "mixtral-8x7b-32768",
"tags": "LLM,CHAT,5k", "tags": "LLM,CHAT,5k",

+ 3
- 2
deepdoc/vision/recognizer.py 查看文件

from .operators import * # noqa: F403 from .operators import * # noqa: F403
from .operators import preprocess from .operators import preprocess



class Recognizer(object): class Recognizer(object):
def __init__(self, label_list, task_name, model_dir=None): def __init__(self, label_list, task_name, model_dir=None):
""" """
return 0 return 0
x0_ = max(b["x0"], x0) x0_ = max(b["x0"], x0)
x1_ = min(b["x1"], x1) x1_ = min(b["x1"], x1)
assert x0_ <= x1_, "Fuckedup! T:{},B:{},X0:{},X1:{} ==> {}".format(
assert x0_ <= x1_, "Bbox mismatch! T:{},B:{},X0:{},X1:{} ==> {}".format(
tp, btm, x0, x1, b) tp, btm, x0, x1, b)
tp_ = max(b["top"], tp) tp_ = max(b["top"], tp)
btm_ = min(b["bottom"], btm) btm_ = min(b["bottom"], btm)
assert tp_ <= btm_, "Fuckedup! T:{},B:{},X0:{},X1:{} => {}".format(
assert tp_ <= btm_, "Bbox mismatch! T:{},B:{},X0:{},X1:{} => {}".format(
tp, btm, x0, x1, b) tp, btm, x0, x1, b)
ov = (btm_ - tp_) * (x1_ - x0_) if x1 - \ ov = (btm_ - tp_) * (x1_ - x0_) if x1 - \
x0 != 0 and btm - tp != 0 else 0 x0 != 0 and btm - tp != 0 else 0

+ 0
- 1
rag/utils/s3_conn.py 查看文件

import logging import logging
import boto3 import boto3
import os
from botocore.exceptions import ClientError from botocore.exceptions import ClientError
from botocore.client import Config from botocore.client import Config
import time import time

正在加载...
取消
保存