Text Generation
Transformers
Safetensors
Upper Grand Valley Dani
llama
genomic
speculative-decoding
text-generation-inference
Instructions to use HuggingFaceBio/Carbon-500M with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use HuggingFaceBio/Carbon-500M with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="HuggingFaceBio/Carbon-500M")# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("HuggingFaceBio/Carbon-500M") model = AutoModelForCausalLM.from_pretrained("HuggingFaceBio/Carbon-500M", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use HuggingFaceBio/Carbon-500M with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "HuggingFaceBio/Carbon-500M" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "HuggingFaceBio/Carbon-500M", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/HuggingFaceBio/Carbon-500M
- SGLang
How to use HuggingFaceBio/Carbon-500M 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 "HuggingFaceBio/Carbon-500M" \ --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": "HuggingFaceBio/Carbon-500M", "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 "HuggingFaceBio/Carbon-500M" \ --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": "HuggingFaceBio/Carbon-500M", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use HuggingFaceBio/Carbon-500M with Docker Model Runner:
docker model run hf.co/HuggingFaceBio/Carbon-500M
Commit History
-
tokenizer: expose .vocab property for fast-tokenizer-style callers
Verified signatureAdds a `vocab` property mirroring `get_vocab()` so downstream tools that expect the fast-tokenizer interface (e.g. llama.cpp's `convert_hf_to_gguf.py` which does `tokenizer.vocab`) work without a fallback. No behavior change.54d1dc0 -
Update README.md
Verified signature19273a6
-
Update README.md
Verified signature1223795 -
Update README.md
Verified signature021dd2b -
Update README.md
Verified signature57127eb -
fix: correct bos/eos/pad token IDs in generation_config (eos=pad=151643, bos=null)
Verified signature4d2ebe0 -
Update README.md
Verified signaturedff0b7f -
Upload figures/carbon-500m-banner.png
Verified signature6643225 -
Update README.md
Verified signaturef2c5de1
-
docs: fix dtype, remove trust_remote_code for model, clean up internal comments
Verified signaturec933421 -
revert: restore LlamaForCausalLM in config.json
Verified signature9d803d5 -
revert: remove auto_map, restore LlamaForCausalLM (no trust_remote_code needed)
Verified signature75822fe
-
tokenizer: fix decode() to handle torch tensor input via .tolist()
Verified signature6411d45 -
modeling_carbon: replace _sample() override with stable LogitsProcessor API
Verified signature6300b57 -
Update tokenizer.py
Verified signaturee1cc2f4 -
Upload modeling_carbon.py
Verified signature6aad06c -
Update config.json
Verified signature1f08d98
-
model card: fix typos, remove TODOs, 48->49 kbp, add skip_special_tokens=True
Verified signatureddc127f -
tokenizer: fix auto_dna_tags None -> False
Verified signature098b919 -
tokenizer: add auto_dna_tags to dna_config.json
Verified signature8da7a58 -
tokenizer: fix EOS append bug, decode skip_special_tokens=True, add auto_dna_tags
Verified signaturea5f56cd -
Update model card namespace references (#1)
- Update model card namespace references (2c7dd09156581162f46a229d78a3dbdff91a69ce)a955d9a -
Update README.md
Verified signature805e7ba -
Promote hybrid step-286000 to main (300B CE + 300B FNS, total 600B tokens)
Verified signature401b752
-
Update README.md
Verified signaturec3a251e -
initial commit
Verified signaturefbabbaf