Text Generation
PEFT
Safetensors
Transformers
recommendation
lora
generative-recommendation
itemic-token
qwen3
llama-factory
conversational
Instructions to use dfdu233/OneReason-0.8B-lora-expA with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- PEFT
How to use dfdu233/OneReason-0.8B-lora-expA with PEFT:
from peft import PeftModel from transformers import AutoModelForCausalLM base_model = AutoModelForCausalLM.from_pretrained("/root/autodl-tmp/LLM/model_cache/OneReason-0.8B-pretrain-competition") model = PeftModel.from_pretrained(base_model, "dfdu233/OneReason-0.8B-lora-expA") - Transformers
How to use dfdu233/OneReason-0.8B-lora-expA with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="dfdu233/OneReason-0.8B-lora-expA") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("dfdu233/OneReason-0.8B-lora-expA", dtype="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use dfdu233/OneReason-0.8B-lora-expA with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "dfdu233/OneReason-0.8B-lora-expA" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "dfdu233/OneReason-0.8B-lora-expA", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/dfdu233/OneReason-0.8B-lora-expA
- SGLang
How to use dfdu233/OneReason-0.8B-lora-expA 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 "dfdu233/OneReason-0.8B-lora-expA" \ --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": "dfdu233/OneReason-0.8B-lora-expA", "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 "dfdu233/OneReason-0.8B-lora-expA" \ --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": "dfdu233/OneReason-0.8B-lora-expA", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use dfdu233/OneReason-0.8B-lora-expA with Docker Model Runner:
docker model run hf.co/dfdu233/OneReason-0.8B-lora-expA
OneReason-0.8B-LoRA-ExpA
LoRA adapter fine-tuned from OpenOneRec/OneReason-0.8B-pretrain-competition on the Kuaishou Explorer LLM-Rec Challenge dataset.
Model Details
- Base Model: OpenOneRec/OneReason-0.8B-pretrain-competition (Qwen3-0.8B)
- Fine-tuning Method: LoRA (rank=16, alpha=32)
- Target Modules: q_proj, k_proj, v_proj, o_proj, gate_proj, up_proj, down_proj
- Training Data: Kuaishou LLM-Rec Challenge competition dataset (32K samples)
- Training Steps: 4,660 / 11,571 (~40% of 3 epochs)
- Hardware: NVIDIA RTX 4090 (47GB VRAM)
- Training Time: ~2h 41min
Usage
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))
Training Details
- Loss: 3.023 โ 1.337 (56% reduction over 4660 steps)
- Validation Loss: 1.373 (decreasing, no overfitting)
- Cutoff Length: 8192
- Batch Size: 1 (gradient accumulation 8 = effective batch 8)
- Learning Rate: 3e-5 (cosine schedule)
- Optimizer: paged_adamw_8bit
- Context Length: 8192 tokens
- Flash Attention: fa2
Training Data Distribution
| Task | Samples |
|---|---|
| Recommendation (ๆๆจ่) | 21,885 |
| Item Understanding (ๆ็ฉๆ) | 5,807 |
| User Prediction (ๆ็จๆท) | 4,788 |
| Total | 32,480 |
Framework versions
- PEFT 0.18.1
- PyTorch 2.4.0
- Transformers 5.6.0
- Flash-Attn 2.6.3
- Downloads last month
- 27