--- library_name: transformers model_name: output-08-0-0805 tags: - generated_from_trainer - trl - sft licence: license license: apache-2.0 datasets: - wangzihaogithub/job-educational-parser-dataset-08-0-0805 language: - zh metrics: - accuracy base_model: - Qwen/Qwen3-0.6B-Base pipeline_tag: text-generation --- # Model Card for wangzihaogithub/job-educational-parser This model is a fine-tuned version of [job-educational-parser](https://huggingface.co/job-educational-parser). It has been trained using [TRL](https://github.com/huggingface/trl). 模型任务:输入岗位描述,输出岗位中要求的学历(如 "博士、硕士、本科"),遵循从高到低 训练数据:[https://huggingface.co/datasets/wangzihaogithub/job-educational-parser-dataset-08-0-0805](https://huggingface.co/datasets/wangzihaogithub/job-educational-parser-dataset-08-0-0805). 例如: 输入 ```json { "model": "wangzihaogithub/job-educational-parser", "messages": [ { "role": "system", "content": "从岗位中提取学历" }, { "role": "user", "content": "游戏美术实习-原画类(26届提供转正)游戏类型&风格:欧美卡通 休闲类游戏 工作职责: 1. 配合各项目组美术需求(包括不限于原画,UI和动画类需求)的落地和整合; 2. 具有比较扎实的手绘能力,能够独立完成运营活动所需的美术设计需求; 3. 通过对主流AI产品的学习,总结提示词使用技巧,通过具体案例验证方法的有效性,协助团队建立规范化的AI应用方法论和完善AI工作流程。 岗位要求: 1.面向游戏/动画/数媒/雕塑/美术/工业设计等设计相关专业; 2.本科及以上学历; 3.2026年应届毕业生; 4.有优秀的绘画基础,会用手绘板,熟练掌握PS等2D设计软件 加分项: 1.美术院校相关专业者优先; 2.爱玩游戏者优先; 3.有相关美术设计实习或者工作经验者优先考虑; 4.性格乐观爽朗,善于表达。" } ], "max_tokens": 32 } ``` 输出(固定格式):博士、硕士、本科 响应速度:100~200毫秒之间(显卡RTX3060,精度BF16) 准确率:98%, 评测集:[https://huggingface.co/datasets/wangzihaogithub/job-educational-parser-dataset-08-0-0805/viewer/annotated-test](https://huggingface.co/datasets/wangzihaogithub/job-educational-parser-dataset-08-0-0805/viewer/annotated-test). ## Requirements transformers>=4.51.0 ### Framework versions - TRL: 0.19.0 - Transformers: 4.53.0 - Pytorch: 2.6.0 - Datasets: 3.6.0 - Tokenizers: 0.21.2 ## Quick start ```python from transformers import AutoModelForCausalLM, AutoTokenizer import torch model_name = "wangzihaogithub/job-educational-parser" # 加载分词器和模型 tokenizer = AutoTokenizer.from_pretrained(model_name, cache_dir="./cache") model = AutoModelForCausalLM.from_pretrained( model_name, torch_dtype="auto", device_map="auto", cache_dir="./cache" ) print('model load success') messages = [ {"role": "system", "content": '从岗位中提取学历'}, {"role": "user", "content": "游戏美术实习-原画类(26届提供转正)游戏类型&风格:欧美卡通 休闲类游戏 工作职责: 1. 配合各项目组美术需求(包括不限于原画,UI和动画类需求)的落地和整合; 2. 具有比较扎实的手绘能力,能够独立完成运营活动所需的美术设计需求; 3. 通过对主流AI产品的学习,总结提示词使用技巧,通过具体案例验证方法的有效性,协助团队建立规范化的AI应用方法论和完善AI工作流程。 岗位要求: 1.面向游戏/动画/数媒/雕塑/美术/工业设计等设计相关专业; 2.本科及以上学历; 3.2026年应届毕业生; 4.有优秀的绘画基础,会用手绘板,熟练掌握PS等2D设计软件 加分项: 1.美术院校相关专业者优先; 2.爱玩游戏者优先; 3.有相关美术设计实习或者工作经验者优先考虑; 4.性格乐观爽朗,善于表达。"} ] text = tokenizer.apply_chat_template( messages, tokenize=False, add_generation_prompt=True, enable_thinking=False ) model_inputs = tokenizer([text], return_tensors="pt").to(model.device) # 生成推理结果(关闭梯度计算) with torch.inference_mode(), torch.amp.autocast('cuda'): generated_ids = model.generate( **model_inputs, max_new_tokens=32,# 输出结果为学历,不需要太多 eos_token_id=tokenizer.eos_token_id, pad_token_id=tokenizer.pad_token_id, use_cache=True, do_sample=False, # 是否采样(False 为 greedy decode) temperature=None, # 关闭 top_p=None,# 关闭 top_k=None# 关闭 ) output_ids = generated_ids[0][len(model_inputs.input_ids[0]):].tolist() # parsing thinking content try: # rindex finding 151668 () index = len(output_ids) - output_ids[::-1].index(151668) except ValueError: index = 0 content = tokenizer.decode(output_ids[index:], skip_special_tokens=True).strip("\n") print(content) ``` ## Training procedure This model was trained with SFT. ## Citations Cite TRL as: ```bibtex @misc{vonwerra2022trl, title = {{TRL: Transformer Reinforcement Learning}}, author = {Leandro von Werra and Younes Belkada and Lewis Tunstall and Edward Beeching and Tristan Thrush and Nathan Lambert and Shengyi Huang and Kashif Rasul and Quentin Gallou{\'e}dec}, year = 2020, journal = {GitHub repository}, publisher = {GitHub}, howpublished = {\url{https://github.com/huggingface/trl}} } ```