Instructions to use NingLab/eCeLLM-S with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use NingLab/eCeLLM-S with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="NingLab/eCeLLM-S", trust_remote_code=True)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("NingLab/eCeLLM-S", trust_remote_code=True) model = AutoModelForCausalLM.from_pretrained("NingLab/eCeLLM-S", trust_remote_code=True, device_map="auto") - Inference
- Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use NingLab/eCeLLM-S with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "NingLab/eCeLLM-S" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "NingLab/eCeLLM-S", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/NingLab/eCeLLM-S
- SGLang
How to use NingLab/eCeLLM-S 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 "NingLab/eCeLLM-S" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "NingLab/eCeLLM-S", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'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 "NingLab/eCeLLM-S" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "NingLab/eCeLLM-S", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use NingLab/eCeLLM-S with Docker Model Runner:
docker model run hf.co/NingLab/eCeLLM-S
File size: 851 Bytes
50b8882 864463e 7c60866 50b8882 864463e 67cb993 4572bae 35a17d8 4572bae | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 | ---
license: cc-by-4.0
datasets:
- NingLab/ECInstruct
---
# eCeLLM-S
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-S model is instruction-tuned from the large base models [Phi-2](https://huggingface.co/microsoft/phi-2).
## Citation
```bibtex
@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}
}
``` |