# Load model directly
from transformers import AutoTokenizer, AutoModelForCausalLM
tokenizer = AutoTokenizer.from_pretrained("NingLab/eCeLLM-L")
model = AutoModelForCausalLM.from_pretrained("NingLab/eCeLLM-L")
messages = [
{"role": "user", "content": "Who are you?"},
]
inputs = tokenizer.apply_chat_template(
messages,
add_generation_prompt=True,
tokenize=True,
return_dict=True,
return_tensors="pt",
).to(model.device)
outputs = model.generate(**inputs, max_new_tokens=40)
print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:]))Quick Links
eCeLLM-L
This repo contains the models for "eCeLLM: Generalizing Large Language Models for E-commerce from Large-scale, High-quality Instruction Data"
eCeLLM Models
Leveraging ECInstruct, we develop eCeLLM by instruction tuning general-purpose LLMs (base models). The eCeLLM-L model is instruction-tuned from the large base models Llama-2 13B-chat.
Citation
@inproceedings{
peng2024ecellm,
title={eCe{LLM}: Generalizing Large Language Models for E-commerce from Large-scale, High-quality Instruction Data},
author={Bo Peng and Xinyi Ling and Ziru Chen and Huan Sun and Xia Ning},
booktitle={Forty-first International Conference on Machine Learning},
year={2024},
url={https://openreview.net/forum?id=LWRI4uPG2X}
}
- Downloads last month
- 17
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="NingLab/eCeLLM-L") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)