Downloads · 30 days
15
3% of all-time downloads
yxccai/text-style-converter
text-style-converter is a text generation model from yxccai. Use it when you need the model to write or continue text. The card lists the license as apache-2.0.
这是一个基于DeepSeek-R1-Distill-Llama-8B微调的中文文本风格转换模型,专门用于将书面化、技术性文本转换为自然、口语化的表达方式。
Downloads · 30 days
15
3% of all-time downloads
All-time downloads
432
Public
Parameters
8.2B
6.1 GB on disk
Likes
1
Public
Click a slice to open those files.
.safetensors6 GB · 100%
How the weights are stored.
U87B · 85%
From the Hugging Face model README
这是一个基于DeepSeek-R1-Distill-Llama-8B微调的中文文本风格转换模型,专门用于将书面化、技术性文本转换为自然、口语化的表达方式。
from transformers import AutoTokenizer, AutoModelForCausalLM
tokenizer = AutoTokenizer.from_pretrained("yxccai/text-style-converter")
model = AutoModelForCausalLM.from_pretrained("yxccai/text-style-converter")
prompt = '''以下是一个文本风格转换任务,请将书面化、技术性的输入文本转换为自然、口语化的表达方式。
### 输入文本:
乙醇的检测方法包括以下几项: 1. 酸碱度检查:取20ml乙醇加20ml水,加2滴酚酞指示剂应无色。
### 输出文本:
'''
inputs = tokenizer(prompt, return_tensors="pt")
outputs = model.generate(**inputs, max_new_tokens=500)
result = tokenizer.decode(outputs[0], skip_special_tokens=True)
print(result)
使用中文医学、化学文本的书面化-口语化配对数据进行微调。
Apache 2.0