Text Generation
Transformers
Safetensors
cola2
feature-extraction
custom_code
diffusion
continuous-latent
base-model
conversational
Instructions to use ByteDance-Seed/Cola2 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use ByteDance-Seed/Cola2 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="ByteDance-Seed/Cola2", trust_remote_code=True) messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# pip install -U transformers accelerate # Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("ByteDance-Seed/Cola2", trust_remote_code=True, device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use ByteDance-Seed/Cola2 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "ByteDance-Seed/Cola2" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "ByteDance-Seed/Cola2", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/ByteDance-Seed/Cola2
- SGLang
How to use ByteDance-Seed/Cola2 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 "ByteDance-Seed/Cola2" \ --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": "ByteDance-Seed/Cola2", "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 "ByteDance-Seed/Cola2" \ --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": "ByteDance-Seed/Cola2", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use ByteDance-Seed/Cola2 with Docker Model Runner:
docker model run hf.co/ByteDance-Seed/Cola2
Download SHA256SUMS from ByteDance-Seed/Cola2: direct link, hf CLI and curl.
- Browser
- Download file 1.8 kB
-
https://huggingface.co/ByteDance-Seed/Cola2/resolve/main/SHA256SUMS
- Command line
-
hf download hf://ByteDance-Seed/Cola2/SHA256SUMS
-
curl -L -o SHA256SUMS https://huggingface.co/ByteDance-Seed/Cola2/resolve/main/SHA256SUMS
1.8 kB
| 4c43218f798a85740b148f09f978ae807d2bac0d9c9e5e06bb37389e69ba7840 README.md | |
| 5a05246f1c71e311cdf0ea836ce86e9a765950037b99d7996ac21b2198a59878 config.json | |
| 5b5448689b4b7d0b2f8f930c8083d190801a4c71ca5132bc342f154ddaa8b76a configuration_cola2.py | |
| 6f5a7de97f331aad551e0c5fcf5dddc6230ccdfc5d3cae3c8be693775ff1deb7 generation_config.json | |
| 8831e4f1a044471340f7c0a83d7bd71306a5b867e95fd870f74d0c5308a904d5 merges.txt | |
| a73eb09cda3c5962a43644f1eaf86e3d1101f45ee10412aa25e9475578a15110 model-00001-of-00008.safetensors | |
| 8638542786f3e95d549e22cb996b664a6a62e0ca646e6c4a69a90fd0ae2483ce model-00002-of-00008.safetensors | |
| a06ac377b1d0cc403ee3bb34714447814f774077846c659aa864842928ff8806 model-00003-of-00008.safetensors | |
| 2a29c5efc7576c3ede1b0356cb22fa635beedc17ee227854defc66914383c5a4 model-00004-of-00008.safetensors | |
| 5cc506e09365b3a824dd7e4814da303947f31a302fad750179b6b0106a2503b0 model-00005-of-00008.safetensors | |
| f8b3656f8201327828d09e2a0e368adadd08cdd4795dccc896a4e8d1bc328968 model-00006-of-00008.safetensors | |
| e6371cde92297d41a1c74cbd60025070a6b5433b140910f3dd5fe859ccafb38e model-00007-of-00008.safetensors | |
| dde98087cbb7fc78164e44c15b60470d640167136d858063ee3a806b93980ecc model-00008-of-00008.safetensors | |
| c8cb1c3de4e5b257b5625958acc8a076bc4fa99e6f63ad8f56d1a51b4ba6e599 model.safetensors.index.json | |
| 2e0635b8a3f9de9ac5eb66c3ac4078bd4de1e6aa0834adcf155892632828b238 modeling_cola2.py | |
| af9eb16dba7d04198abbc1318bac3ddff25a93add401b94b4365ba6819e78360 modeling_layers.py | |
| a4c29a7f63146cb43eef20b92caab0e2a5000d13d4dc9cd29888bbfad8059466 special_tokens_map.json | |
| c0382117ea329cdf097041132f6d735924b697924d6f6fc3945713e96ce87539 tokenizer.json | |
| 3c04ed3ca964ea2f6b2b5faf0dc4d31aec1cb1e8b4bcf63f402d295046b422b5 tokenizer_config.json | |
| ca10d7e9fb3ed18575dd1e277a2579c16d108e32f27439684afa0e10b1440910 vocab.json | |