Text Generation
Transformers
Safetensors
English
llama
causal-lm
sharded
t5-tokenizer
text-generation-inference
Instructions to use banyanhq/banyan-5b-deep with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use banyanhq/banyan-5b-deep with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="banyanhq/banyan-5b-deep")# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("banyanhq/banyan-5b-deep") model = AutoModelForCausalLM.from_pretrained("banyanhq/banyan-5b-deep") - Notebooks
- Google Colab
- Kaggle
- Local Apps
- vLLM
How to use banyanhq/banyan-5b-deep with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "banyanhq/banyan-5b-deep" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "banyanhq/banyan-5b-deep", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/banyanhq/banyan-5b-deep
- SGLang
How to use banyanhq/banyan-5b-deep 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 "banyanhq/banyan-5b-deep" \ --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": "banyanhq/banyan-5b-deep", "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 "banyanhq/banyan-5b-deep" \ --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": "banyanhq/banyan-5b-deep", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use banyanhq/banyan-5b-deep with Docker Model Runner:
docker model run hf.co/banyanhq/banyan-5b-deep
HF Export: Banyan 5B Deep (T5 tokenizer)
Contents
- model-00001-of-00001.safetensors, model.safetensors.index.json
- config.json (llama architecture, 48 layers, 2560 hidden, 24/8 heads)
- tokenizer.json, tokenizer_config.json, special_tokens_map.json, spiece.model (custom T5)
- generation_config.json
Usage
from transformers import AutoTokenizer, AutoModelForCausalLM
import torch
path = "outputs/checkpoint/step-78100-hf2"
tok = AutoTokenizer.from_pretrained(path)
model = AutoModelForCausalLM.from_pretrained(path, dtype="auto", device_map="auto")
prompt = "Why is the sky blue?"
enc = tok(prompt, return_tensors="pt", add_special_tokens=False).to(model.device)
out = model.generate(**enc, max_new_tokens=64, do_sample=True, temperature=0.8)
print(tok.decode(out[0], skip_special_tokens=False))
Notes
- The tokenizer is SentencePiece-based (T5). Do not add EOS at prompt time; use
add_special_tokens=Falsewhen tokenizing prompts for generation. - The model config is tailored to vocab_size=32100 and rope_theta=500000.
- If you prefer multi-shard weights, provide a
model.safetensors.index.jsonand re-save.
- Downloads last month
- 3