Instructions to use GItaf/bert2bert-with-cross-attn-decoder with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use GItaf/bert2bert-with-cross-attn-decoder with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="GItaf/bert2bert-with-cross-attn-decoder")# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("GItaf/bert2bert-with-cross-attn-decoder") model = AutoModelForCausalLM.from_pretrained("GItaf/bert2bert-with-cross-attn-decoder", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use GItaf/bert2bert-with-cross-attn-decoder with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "GItaf/bert2bert-with-cross-attn-decoder" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "GItaf/bert2bert-with-cross-attn-decoder", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/GItaf/bert2bert-with-cross-attn-decoder
- SGLang
How to use GItaf/bert2bert-with-cross-attn-decoder 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 "GItaf/bert2bert-with-cross-attn-decoder" \ --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": "GItaf/bert2bert-with-cross-attn-decoder", "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 "GItaf/bert2bert-with-cross-attn-decoder" \ --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": "GItaf/bert2bert-with-cross-attn-decoder", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use GItaf/bert2bert-with-cross-attn-decoder with Docker Model Runner:
docker model run hf.co/GItaf/bert2bert-with-cross-attn-decoder
Download pytorch_model.bin from GItaf/bert2bert-with-cross-attn-decoder: direct link, hf CLI and curl.
- Browser
- Download file 554 MB
-
https://huggingface.co/GItaf/bert2bert-with-cross-attn-decoder/resolve/276c0ea6febb89532a09da170cf3415528a5713c/pytorch_model.bin
- Command line
-
hf download hf://GItaf/bert2bert-with-cross-attn-decoder@276c0ea6febb89532a09da170cf3415528a5713c/pytorch_model.bin
-
curl -L -o pytorch_model.bin https://huggingface.co/GItaf/bert2bert-with-cross-attn-decoder/resolve/276c0ea6febb89532a09da170cf3415528a5713c/pytorch_model.bin
554 MB
- Xet hash:
- df6bca9f426214d0c1b471e1ea3a14f70ffeda2027c57e339c88b1aa11f7c5f8
- Size of remote file:
- 554 MB
- SHA256:
- aa5e69b5ccf8d4351e595d2ac4976a6b9f96b0aa1c4bd71292dc67d810a9668c
·
Xet efficiently stores Large Files inside Git, intelligently splitting files into unique chunks and accelerating uploads and downloads. More info.