Downloads · 30 days
18
17% of all-time downloads
wonzer/qwen3_lora_mix
qwen3_lora_mix is a text generation model from wonzer. Use it when you need the model to write or continue text. It is set up for transformers. The card lists the license as apache-2.0.
这是一个基于 Qwen/Qwen3-4B 和自定义LoRA适配器合并的模型,专门用于中文小说生成。
Downloads · 30 days
18
17% of all-time downloads
All-time downloads
104
Public
Parameters
4B
8.1 GB on disk
Likes
0
Public
Click a slice to open those files.
.safetensors8 GB · 100%
From the Hugging Face model README
这是一个基于 Qwen/Qwen3-4B 和自定义LoRA适配器合并的模型,专门用于中文小说生成。
from transformers import AutoModelForCausalLM, AutoTokenizer
# 加载模型和tokenizer
model = AutoModelForCausalLM.from_pretrained("your-username/model-name")
tokenizer = AutoTokenizer.from_pretrained("your-username/model-name")
# 生成文本
def generate_story(prompt, max_length=500):
inputs = tokenizer(prompt, return_tensors="pt")
outputs = model.generate(
**inputs,
max_length=max_length,
temperature=0.7,
do_sample=True,
top_p=0.9,
repetition_penalty=1.1
)
return tokenizer.decode(outputs[0], skip_special_tokens=True)
# 示例
story = generate_story("请写一个关于友情的故事:")
print(story)
输入: "请写一个关于友情的故事:"
输出: [模型会生成相应的故事内容]
本模型遵循Apache 2.0许可证。