Text Generation
Transformers
Safetensors
Upper Grand Valley Dani
llama
genomic
biology
text-generation-inference
Instructions to use HuggingFaceBio/Carbon-3B with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use HuggingFaceBio/Carbon-3B with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="HuggingFaceBio/Carbon-3B")# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("HuggingFaceBio/Carbon-3B") model = AutoModelForCausalLM.from_pretrained("HuggingFaceBio/Carbon-3B", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use HuggingFaceBio/Carbon-3B with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "HuggingFaceBio/Carbon-3B" # 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-3B", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/HuggingFaceBio/Carbon-3B
- SGLang
How to use HuggingFaceBio/Carbon-3B 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-3B" \ --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-3B", "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-3B" \ --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-3B", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use HuggingFaceBio/Carbon-3B with Docker Model Runner:
docker model run hf.co/HuggingFaceBio/Carbon-3B
Commit History
-
Support return_assistant_tokens_mask on slow HybridDNATokenizer for completion-only SFT (apply_chat_template token-boundary mask override)
Verified signature95c3c68 -
Remove base fast-tokenizer files so loads without trust_remote_code raise instead of silently using base BPE
Verified signature86d5f06
-
load chat_template in from_pretrained (vLLM apply_chat_template fix)
Verified signature4869a50 -
load chat_template in from_pretrained (vLLM apply_chat_template fix)
Verified signature1f15b8c
-
load chat_template in from_pretrained (vLLM apply_chat_template fix)
Verified signature0650dae -
load chat_template in from_pretrained (vLLM apply_chat_template fix)
Verified signaturef2dd7fa
-
fix convert_tokens_to_string byte-level detok (vLLM)
Verified signatureb232b2e
-
Update README.md
Verified signature96ff92c
-
Upload tech-report.pdf
Verified signaturee4cc961 -
Update README.md
Verified signature7b746cf
-
delete chat template
Verified signaturefe755cb -
tokenizer: expose .vocab property for fast-tokenizer-style callers (#4)
- tokenizer: expose .vocab property for fast-tokenizer-style callers (4c899c4a81891ab991f683bb459408646d52e506)7fe1e11 -
Update README.md
Verified signature7242d57 -
Upload tech-report.pdf
Verified signaturee556f3b
-
Update README.md
Verified signaturef801a61 -
Update README.md
Verified signatureffed212 -
fix: correct bos/eos/pad token IDs in generation_config (eos=pad=151643, bos=null)
Verified signature10cd7dd -
fix tata and syn
Verified signaturea8e4fca -
Update README.md
Verified signature04ca264 -
Upload carbon-3b-banner.png
Verified signature7a95b29 -
Update README.md
Verified signature593325c -
Update README.md
Verified signature2d8bb5d -
Upload pareto.png
Verified signature30c96f0 -
Update README.md
Verified signature2966545 -
Upload figures/inference.png
Verified signature06e0869 -
Update README.md
Verified signaturec661e26 -
Add FNS code
Verified signature5c02535 -
Update README.md
Verified signaturef748d2a
-
model card: fix YaRN context 384 kbp → 393 kbp (65,536 tokens × 6 bp)
Verified signature46c2c30
-
config: restore full config as LlamaForCausalLM (no auto_map)
Verified signature2ca2ac5 -
config: add model_type=llama for AutoModelForCausalLM without trust_remote_code
Verified signature6979bd3 -
docs: fix dtype, remove trust_remote_code for model, clean up internal comments
Verified signaturedeb09a9 -
revert: restore LlamaForCausalLM in config.json
Verified signatureeeaa854 -
revert: remove auto_map, restore LlamaForCausalLM (no trust_remote_code needed)
Verified signaturecbacdb4
-
Update README.md
Verified signaturebc2257f -
tokenizer: fix decode() to handle torch tensor input via .tolist()
Verified signatureac0ca80 -
modeling_carbon: replace _sample() override with stable LogitsProcessor API
Verified signaturee66f05b -
Update tokenizer.py
Verified signaturecac27f2 -
Update README.md
Verified signaturefabe9ba -
Update README.md
Verified signature9a20dad -
Update config.json
Verified signature3dedee4 -
Update config.json
Verified signaturef555ca2 -
Upload modeling_carbon.py
Verified signature01fd9be
-
model card: fix skip_special_tokens decode (bug fixed), remove wrong left-padding TODO
Verified signatureceed708 -
Update model card namespace references (#3)
- Update model card namespace references (4a06cee42649739cf7b177f9aa48976f448e6533)1e17783 -
Fix tokenizer: EOS bug + decode skip_special_tokens=True empty string (#1)
- tokenizer: fix EOS append bug and decode skip_special_tokens=True bug (fc7967265c9d9c976c32ec73379141d3fcf01851) - tokenizer: add auto_dna_tags to dna_config.json (437e67577a9a504fefd24858adc26cb1af85f8ff) - tokenizer: fix auto_dna_tags None -> False in tokenizer_config.json (e3cb1186e1803f151c1bf0942f7603c5d2b77fc4)f47e012 -
Update README.md (#2)
- Update README.md (7074e5523216e156065f87ddeb964f060aada036)5f76c0a
-
Update README.md
Verified signatureb2b5137 -
Create README.md
Verified signature3743563 -
Initial release · sourced from hf-carbon/carbon-3B-longctx-32k-from-mix2decay-429k @ step-453000
Verified signature12de471