Token Classification
Transformers
Safetensors
Upper Grand Valley Dani
generanno
biology
genomics
eukaryotes
cds
custom-code
custom_code
Instructions to use HuggingFaceBio/Carbon-A-1.2B with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use HuggingFaceBio/Carbon-A-1.2B with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("token-classification", model="HuggingFaceBio/Carbon-A-1.2B", trust_remote_code=True)# pip install -U transformers accelerate # Load model directly from transformers import AutoModelForTokenClassification model = AutoModelForTokenClassification.from_pretrained("HuggingFaceBio/Carbon-A-1.2B", trust_remote_code=True, device_map="auto") - Notebooks
- Google Colab
- Kaggle
Support Transformers 5
#1
by kashif HF Staff - opened
Makes the model load correctly with Transformers 5.x while keeping 4.56+ working.
modeling_generanno.py: compute default RoPE inverse frequencies locally (v5 droppedROPE_INIT_FUNCTIONS["default"]), registeroriginal_inv_freqas a buffer, and recompute RoPE buffers in_init_weights. Without this, v5 loads the model with uninitializedinv_freqbuffers and produces wrong predictions without any error.requirements.txt:transformers>=4.56,<6; drop thehuggingface_hub<1pin.infer_packed.py:torch_dtype=βdtype=.- README: download/install steps in a working order, a minimal Python example, and a note on full-length attention memory.
INFERENCE.md: drop the pinned-version statement.provenance.json: recordmodeling_generanno.pyas modified from the source.
Checked on 4.56.0, 4.57.6 and 5.17.0: all checkpoint tensors load unchanged, and predictions are bit-identical to the current code on 4.56.0.
cgeorgiaw changed pull request status to merged