Instructions to use wangzihaogithub/job-educational-parser with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use wangzihaogithub/job-educational-parser with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="wangzihaogithub/job-educational-parser") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# pip install -U transformers accelerate # Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("wangzihaogithub/job-educational-parser", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use wangzihaogithub/job-educational-parser with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "wangzihaogithub/job-educational-parser" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "wangzihaogithub/job-educational-parser", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/wangzihaogithub/job-educational-parser
- SGLang
How to use wangzihaogithub/job-educational-parser with SGLang:
Install from pip and serve model
# Install SGLang from pip: pip install sglang # Start the SGLang server: python3 -m sglang.launch_server \ --model-path "wangzihaogithub/job-educational-parser" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "wangzihaogithub/job-educational-parser", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker images
docker run --gpus all \ --shm-size 32g \ -p 30000:30000 \ -v ~/.cache/huggingface:/root/.cache/huggingface \ --env "HF_TOKEN=<secret>" \ --ipc=host \ lmsysorg/sglang:latest \ python3 -m sglang.launch_server \ --model-path "wangzihaogithub/job-educational-parser" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "wangzihaogithub/job-educational-parser", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use wangzihaogithub/job-educational-parser with Docker Model Runner:
docker model run hf.co/wangzihaogithub/job-educational-parser
|
Download README.md from wangzihaogithub/job-educational-parser: direct link, hf CLI and curl.
- Browser
- Download file 5.7 kB
-
https://huggingface.co/wangzihaogithub/job-educational-parser/resolve/main/README.md
- Command line
-
hf download hf://wangzihaogithub/job-educational-parser/README.md
-
curl -L -o README.md https://huggingface.co/wangzihaogithub/job-educational-parser/resolve/main/README.md
5.7 kB
| 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 (</think>) | |
| 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}} | |
| } | |
| ``` |