Instructions to use liujch1998/crystal-large with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use liujch1998/crystal-large with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="liujch1998/crystal-large")# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForSeq2SeqLM tokenizer = AutoTokenizer.from_pretrained("liujch1998/crystal-large") model = AutoModelForSeq2SeqLM.from_pretrained("liujch1998/crystal-large", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use liujch1998/crystal-large with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "liujch1998/crystal-large" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "liujch1998/crystal-large", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/liujch1998/crystal-large
- SGLang
How to use liujch1998/crystal-large 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 "liujch1998/crystal-large" \ --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": "liujch1998/crystal-large", "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 "liujch1998/crystal-large" \ --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": "liujch1998/crystal-large", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use liujch1998/crystal-large with Docker Model Runner:
docker model run hf.co/liujch1998/crystal-large
Commit History
-
Upload T5ForConditionalGeneration
58dac88 -
Upload tokenizer
536ce77
-
Update README.md
211b422 -
Update README.md
6f2534e -
Update README.md
9a2af18 -
Update README.md
4527eba
-
Upload T5ForConditionalGeneration
6b978a6 -
Upload tokenizer
161ddfa
-
Upload T5ForConditionalGeneration
c78a22c -
Upload tokenizer
40ff2fc -
Upload T5ForConditionalGeneration
eb66a1e -
Upload tokenizer
d8133ed -
initial commit
c082974