55 lines
1.2 KiB
YAML
55 lines
1.2 KiB
YAML
server:
|
||
port: 9090
|
||
|
||
spring:
|
||
application:
|
||
name: glm-ocr-service
|
||
jackson:
|
||
default-property-inclusion: non_null
|
||
serialization:
|
||
write-dates-as-timestamps: false
|
||
|
||
# GLM-OCR配置(纯Java本地部署)
|
||
glm-ocr:
|
||
# 模型本地路径(支持相对路径或绝对路径)
|
||
model-path: 'D:/development/community/GLM-OCR'
|
||
# 推理设备: cpu, gpu(0), gpu(1)
|
||
device: cpu
|
||
# 精度: fp32, fp16, bf16, int8
|
||
precision: fp32
|
||
# 最大生成token数
|
||
max-tokens: 8192
|
||
# 批次大小
|
||
batch-size: 1
|
||
# 图像预处理大小
|
||
image-size: 448
|
||
# 是否启用模型缓存
|
||
enable-cache: true
|
||
# 缓存目录
|
||
cache-dir: ./cache
|
||
# 是否在启动时自动下载模型
|
||
auto-download: false
|
||
# 模型下载URL
|
||
download-url: https://modelscope.cn/models/ZhipuAI/GLM-OCR
|
||
# 温度参数
|
||
temperature: 0.1
|
||
# Top P采样参数
|
||
top-p: 0.95
|
||
# 请求超时时间(秒)
|
||
timeout: 120
|
||
|
||
# Swagger配置
|
||
springdoc:
|
||
api-docs:
|
||
path: /api-docs
|
||
swagger-ui:
|
||
path: /swagger-ui.html
|
||
enabled: true
|
||
|
||
# 日志配置
|
||
logging:
|
||
level:
|
||
com.example.glmocr: DEBUG
|
||
ai.djl: INFO
|
||
pattern:
|
||
console: "%d{yyyy-MM-dd HH:mm:ss} [%thread] %-5level %logger{36} - %msg%n" |