Text Generation
Transformers
Safetensors
Upper Grand Valley Dani
llama
genomic
text-generation-inference
Instructions to use HuggingFaceBio/Carbon-8B with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use HuggingFaceBio/Carbon-8B with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="HuggingFaceBio/Carbon-8B")# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("HuggingFaceBio/Carbon-8B") model = AutoModelForCausalLM.from_pretrained("HuggingFaceBio/Carbon-8B") - Notebooks
- Google Colab
- Kaggle
- Local Apps
- vLLM
How to use HuggingFaceBio/Carbon-8B with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "HuggingFaceBio/Carbon-8B" # 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-8B", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/HuggingFaceBio/Carbon-8B
- SGLang
How to use HuggingFaceBio/Carbon-8B 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-8B" \ --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-8B", "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-8B" \ --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-8B", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use HuggingFaceBio/Carbon-8B with Docker Model Runner:
docker model run hf.co/HuggingFaceBio/Carbon-8B
Update README.md
Browse files
README.md
CHANGED
|
@@ -55,15 +55,16 @@ All evaluations are zero-shot and use the [public Carbon evaluation pipeline](ht
|
|
| 55 |
|
| 56 |
### Downstream tasks
|
| 57 |
|
| 58 |
-
| Category | Metric (%) | Carbon
|
| 59 |
|---|---|---|---|---|
|
| 60 |
-
| Generative |
|
| 61 |
-
| Variant effect prediction | BRCA2
|
| 62 |
-
| | TraitGym Mendelian
|
| 63 |
-
| | ClinVar coding
|
| 64 |
-
| | ClinVar non-coding
|
| 65 |
-
| Perturbation |
|
| 66 |
-
| |
|
|
|
|
| 67 |
|
| 68 |
### Genome-NIAH (long-context retrieval)
|
| 69 |
|
|
@@ -82,6 +83,8 @@ Carbon-8B retrieves reliably up to its 32 k native boundary; **YaRN 4×** recove
|
|
| 82 |
|
| 83 |
Generative modelling, variant-effect prediction, motif-perturbation analysis, and long-context retrieval on DNA sequences. For faster inference at shorter contexts, use **Carbon-3B**.
|
| 84 |
|
|
|
|
|
|
|
| 85 |
## License
|
| 86 |
|
| 87 |
Apache 2.0.
|
|
|
|
| 55 |
|
| 56 |
### Downstream tasks
|
| 57 |
|
| 58 |
+
| Category | Metric (%) | Carbon 3B | Carbon 8B | Δ |
|
| 59 |
|---|---|---|---|---|
|
| 60 |
+
| Generative | Sequence Recovery eukaryote | 61.54 | **64.05** | +2.51 |
|
| 61 |
+
| Variant effect prediction | BRCA2 | 84.63 | **85.72** | +1.09 |
|
| 62 |
+
| | TraitGym Mendelian | 33.65 | **36.43** | +2.78 |
|
| 63 |
+
| | ClinVar coding (24 kb) | 92.89 | **93.11** | +0.22 |
|
| 64 |
+
| | ClinVar non-coding (24 kb) | 91.14 | **91.63** | +0.49 |
|
| 65 |
+
| Perturbation | Nucleotide triplet-expansion | 85.20 | **89.05** | +3.85 |
|
| 66 |
+
| | Synonymous codon | 88.89 | **91.46** | +2.57 |
|
| 67 |
+
| Long-context retrieval | Genome-NIAH @ 393 kbp | 79.00 | **86.00** | +7.00 |
|
| 68 |
|
| 69 |
### Genome-NIAH (long-context retrieval)
|
| 70 |
|
|
|
|
| 83 |
|
| 84 |
Generative modelling, variant-effect prediction, motif-perturbation analysis, and long-context retrieval on DNA sequences. For faster inference at shorter contexts, use **Carbon-3B**.
|
| 85 |
|
| 86 |
+
⚠️ **Genetic data is highly sensitive.** Depending on how this model is used (local download, inference API/endpoints, third-party inference providers, Spaces demos or others), input and output data may be processed or handled differently by different providers or space owners. Please make sure you understand and agree with how your data is handled before using the model.
|
| 87 |
+
|
| 88 |
## License
|
| 89 |
|
| 90 |
Apache 2.0.
|