Downloads · 30 days
5
19% of all-time downloads
lwjlwj/failed
failed is a text generation model from lwjlwj. Use it when you need the model to write or continue text. It is set up for peft. The card lists the license as apache-2.0.
LoRA adapter fine-tuned from OpenOneRec/OneReason-0.8B-pretrain-competition on the Kuaishou Explorer LLM-Rec Challenge dataset.
Downloads · 30 days
5
19% of all-time downloads
All-time downloads
27
Public
Repo size
77.4 MB
Likes
0
Public
Click a slice to open those files.
.safetensors40.4 MB · 52%
From the Hugging Face model README
LoRA adapter fine-tuned from OpenOneRec/OneReason-0.8B-pretrain-competition on the Kuaishou Explorer LLM-Rec Challenge dataset.
from transformers import AutoModelForCausalLM, AutoTokenizer
from peft import PeftModel
base_model = "OpenOneRec/OneReason-0.8B-pretrain-competition"
model = AutoModelForCausalLM.from_pretrained(
base_model,
trust_remote_code=True,
torch_dtype="auto",
device_map="auto"
)
tokenizer = AutoTokenizer.from_pretrained(base_model, trust_remote_code=True)
# Load LoRA adapter
model = PeftModel.from_pretrained(model, "dfdu233/OneReason-0.8B-lora-expA")
# Example inference
prompt = "<|prod_begin|><s_a_1183><s_b_746><s_c_5290>,这个商品卖的是什么? /no_think"
messages = [{"role": "user", "content": prompt}]
text = tokenizer.apply_chat_template(messages, tokenize=False, add_generation_prompt=True)
inputs = tokenizer([text], return_tensors="pt").to(model.device)
outputs = model.generate(**inputs, max_new_tokens=512, do_sample=True, top_p=0.95, temperature=0.7)
print(tokenizer.decode(outputs[0][len(inputs.input_ids[0]):], skip_special_tokens=True))
| Task | Samples |
|---|---|
| Recommendation (懂推荐) | 21,885 |
| Item Understanding (懂物料) | 5,807 |
| User Prediction (懂用户) | 4,788 |
| Total | 32,480 |