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
Configuration Parsing Warning:Config file config.json cannot be fetched (too big)
Configuration Parsing Warning:Config file tokenizer_config.json cannot be fetched (too big)
Model Card for wangzihaogithub/job-educational-parser
This model is a fine-tuned version of job-educational-parser. It has been trained using TRL.
ๆจกๅไปปๅก๏ผ่พๅ ฅๅฒไฝๆ่ฟฐ๏ผ่พๅบๅฒไฝไธญ่ฆๆฑ็ๅญฆๅ๏ผๅฆ "ๅๅฃซใ็กๅฃซใๆฌ็ง"๏ผ,้ตๅพชไป้ซๅฐไฝ
่ฎญ็ปๆฐๆฎ๏ผhttps://huggingface.co/datasets/wangzihaogithub/job-educational-parser-dataset-08-0-0805.
ไพๅฆ๏ผ ่พๅ ฅ
{
"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.
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
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:
@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}}
}
- Downloads last month
- 12
Model tree for wangzihaogithub/job-educational-parser
Base model
Qwen/Qwen3-0.6B-Base