batch processing, the generated results may exhibit repetitive content.

#5
by ssszz - opened
def load_model():
    model = AutoModelForImageTextToText.from_pretrained(
        "GOT-OCR-2.0-hf",
        device_map=device,
        trust_remote_code=True
    )
    processor = AutoProcessor.from_pretrained("GOT-OCR-2.0-hf", trust_remote_code=True)
    return model, processor

model, processor = load_model()
.......
inputs = processor(
            batch_images, 
            return_tensors="pt",
            format="pt"
        ).to(device)
        

        print(f"输入张量形状: {inputs['input_ids'].shape}")
        

        generate_ids = model.generate(
            **inputs,
            do_sample=False,
            tokenizer=processor.tokenizer,
            stop_strings="<|im_end|>",
            max_new_tokens=2048,
            num_beams=1
        )
        

generate result:
case1:

\title{
机动车儿童乘员用约束系统
}
\section*{1 范围}
本标准规定了机动车儿童乘员用约束系统(以下简称儿童约束系统)的术语和定义,在车辆上的安装及固定要求, 约束系统的结构, 以及对约束系统总成及其组成部件的性能要求和试验方法。
本标准适用于适合安装在三个车轮或三个车轮以上机动车上的儿童乘员用约束系统, 但不适用于安装在折叠座椅或侧向座椅上的儿童约束系统。
\section*{2 规范性引用文件}
下列文件对于本文件的应用是必不可少的。凡是注日期的引用文件,仅注日期的版本适用于本文件。凡是不注日期的引用文件,其最新版本(包括所有的修改单)适用于本文件。
GB/T 231. 1- 2009 金属材料 布氏硬度试验 第 1 部分:试验方法(eqv ISO 6506-1 = 1999)
GB/T 730 纺织品 色牢度试验 蓝色羊毛标样(1 7)级的品质控制(GB 730-1998,eqv ISO 105- B: 1994)
GB/T 3505-2009 产品几何技术规范(GPS)表面结构轮廓法术语、定义及表面结构参数(eqv ISO 4287:1997)
GB/T 4780 汽车车身术语
GB 6675 国家玩具安全技术规范
GB8410 汽车内饰材料的燃烧特性
GB 11552 乘用车内部凸出物
GB 14166 机动车成年乘员用安全带和约束系统
GB 14167 汽车安全带安装固定点
ISO 6487: 2002 道路车辆碰撞试验中的测量技术设备
ISO 17373: 2005 道路车辆评价低速后面碰撞中乘员头部和颈部与座椅/头枕间相互作用的滑车试验方法
\section*{3 术语和定义}
GB/T 4780 确定的以及下列术语和定义适用于本标准。
\section*{3.1}
\section*{儿童约束系统 child restraint system}
带有保护带扣的织带或相应柔软的部件、调节装置、连接装置、以及辅助装置 [例如手提式婴儿床 (便携睡床)、婴儿携带装置、辅助座椅和/或碰撞防护装置],且能将其稳固放置在机动车上的装置,其设计是通过限制佩戴者身体的移动来减轻在车辆碰撞事故或突然减速情况下对佩戴人员的伤害。
\section*{3.2}
\section*{类型 category}
儿童约束系统按在车辆上放置的位置进行的分类。\section*{3}\section*{3}\section*{3}\section*{3}\section*{3}\section*{3}\section*{3}\section*{3}\section*{3}\section*{3}\section*{3}\section*{3}\section*{3}\section*{3}\section*{3}\section*{3}\section*{3}\section*{3}\section*{3}\section*{3}\section*{3}\section*{3}\section*{3}\section*{3}\section*{3}\section*{3}\section*{3}\section*{3}\section*{3}\section*{3}\section*{3}\section*{3}\section*{3}\section*{3}\section*{3}\section*{3}\section*{3}\section*{3}\section*{3}\section*{3}\section*{3}\section*{3}\section*{3}\section*{3}\section*{3}\section*{3}\section*{3}\section*{3}\section*{3}\section*{3}\section*{3}\section*{3}\section*{3}\section*{3}

page_6.png

case2:

\title{
3.16.7
}
\section*{Y 字形带 Y-shaped belt}
由系在儿童大腿之间和两侧肩膀上的几条织带组合而成的儿童约束带。
\section*{3. 17}
\section*{带扣 buckle}
能使儿童被约束系统约束住或约束系统能被汽车车身结构约束住, 并且能够快速打开的装置。带扣可设有调节装置。
\section*{3. 17. 1}
\section*{封闭式带扣按钮 enclosed buckle release button}
用直径 \(40 \mathrm{~mm}\) 的球体不能打开带扣的带扣按钮。
\section*{3. 17.2}
\section*{非封闭式带扣按钮 non-enclosed buckle release button}
用直径 \(40 \mathrm{~mm}\) 的球体能够打开带扣的带扣按钮,
\section*{3. 18}
\section*{调节装置 adjusting device}
通过调节约束系统或其连接装置, 使安全带能按照佩戴者的身材, 或按照车辆的结构, 或符合两者的要求而进行调整的装置。调节装置可以是带扣的一部分, 或是卷收器的一部分, 或是安全带的其他部分。
\subsection*{3.18. 1}
\section*{快速调节器 quick adjuster}
能够用单手轻松顺利操作的调节装置。
\subsection*{3.18.2}
\section*{儿童约束系统调节器 adjuster mounted directly on child restraint}
直接安装在儿童约束系统的全背带式约束带总成上的调节器, 而不是用于可调整的单个安全带。
\section*{3. 19}
\section*{连接装置 attachments}
是儿童约束系统的一个组成部分, 包括可以直接或通过车辆座椅与车身结构相连、把儿童稳固约束住的安全部件。
\subsection*{3.20}
\section*{支撑腿 support leg}
是儿童约束系统上的永久连接件, 它与车辆结构连接, 用来将减速过程中产生的冲击力不通过座椅座垫直接传至车辆结构。支撑腿可以是可调的。
\subsection*{3.21}
\section*{吸能装置 energy absorber}
能够独立吸收能量,或与织带一起共同吸收能量的装置, 它是儿童约束系统的一部分。
\subsection*{3.22}
\section*{卷收器 retractor}
用来卷收儿童约束系统中部分或全部织带的装置。
\subsection*{3.22. 1}
\section*{自锁式卷收器 an automatically-locking retractor}
可以按所需长度自由抽取织带长度, 并当带扣扣紧时, 可根据佩戴者的身体自动调整织带的长度的卷收器, 并且防止佩戴者意外抽取织带。\footnotetext{
(1)(1)(1)(1)(1)(1)(1)(1)(1)(1)(1)(1)(1)(1)(1)(1)(1)(1)(1)(1)(1)(1)(1)(1)(1)(1)(1)

page_9.png

The model's generated results may not terminate properly, which could be related to parameters associated with the EOS (End of Sequence) or repetition penalties. For example, the original settings might include:
stopping_criteria = [stopping_criteria] and no_repeat_ngram_size = 20

Sign up or log in to comment