Instructions to use BidirLM/BidirLM-1B-Base with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use BidirLM/BidirLM-1B-Base with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("fill-mask", model="BidirLM/BidirLM-1B-Base", trust_remote_code=True)# Load model directly from transformers import AutoModelForMaskedLM model = AutoModelForMaskedLM.from_pretrained("BidirLM/BidirLM-1B-Base", trust_remote_code=True, device_map="auto") - Notebooks
- Google Colab
- Kaggle
Download config.json from BidirLM/BidirLM-1B-Base: direct link, hf CLI and curl.
- Browser
- Download file 1.97 kB
-
https://huggingface.co/BidirLM/BidirLM-1B-Base/resolve/main/config.json
- Command line
-
hf download hf://BidirLM/BidirLM-1B-Base/config.json
-
curl -L -o config.json https://huggingface.co/BidirLM/BidirLM-1B-Base/resolve/main/config.json
1.97 kB
| { | |
| "_sliding_window_pattern": 6, | |
| "architectures": [ | |
| "BidirLMForMaskedLM" | |
| ], | |
| "attention_bias": false, | |
| "attention_dropout": 0.0, | |
| "attn_logit_softcapping": null, | |
| "auto_map": { | |
| "AutoConfig": "configuration_bidirlm.BidirLMConfig", | |
| "AutoModel": "modeling_bidirlm.BidirLMModel", | |
| "AutoModelForMaskedLM": "modeling_bidirlm.BidirLMForMaskedLM", | |
| "AutoModelForSequenceClassification": "modeling_bidirlm.BidirLMForSequenceClassification", | |
| "AutoModelForTokenClassification": "modeling_bidirlm.BidirLMForTokenClassification" | |
| }, | |
| "bos_token_id": 2, | |
| "classifier_pooling": "late", | |
| "dtype": "float32", | |
| "eos_token_id": 1, | |
| "final_logit_softcapping": null, | |
| "head_dim": 256, | |
| "hidden_activation": "gelu_pytorch_tanh", | |
| "hidden_size": 1152, | |
| "initializer_range": 0.02, | |
| "intermediate_size": 6912, | |
| "layer_types": [ | |
| "sliding_attention", | |
| "sliding_attention", | |
| "sliding_attention", | |
| "sliding_attention", | |
| "sliding_attention", | |
| "full_attention", | |
| "sliding_attention", | |
| "sliding_attention", | |
| "sliding_attention", | |
| "sliding_attention", | |
| "sliding_attention", | |
| "full_attention", | |
| "sliding_attention", | |
| "sliding_attention", | |
| "sliding_attention", | |
| "sliding_attention", | |
| "sliding_attention", | |
| "full_attention", | |
| "sliding_attention", | |
| "sliding_attention", | |
| "sliding_attention", | |
| "sliding_attention", | |
| "sliding_attention", | |
| "full_attention", | |
| "sliding_attention", | |
| "sliding_attention" | |
| ], | |
| "max_position_embeddings": 32768, | |
| "model_type": "bidirlm", | |
| "num_attention_heads": 4, | |
| "num_hidden_layers": 26, | |
| "num_key_value_heads": 1, | |
| "pad_token_id": 0, | |
| "query_pre_attn_scalar": 256, | |
| "rms_norm_eps": 1e-06, | |
| "rope_local_base_freq": 10000, | |
| "rope_scaling": null, | |
| "rope_theta": 1000000, | |
| "sliding_window": 512, | |
| "sliding_window_pattern": 6, | |
| "transformers_version": "5.9.0", | |
| "use_bidirectional_attention": true, | |
| "use_cache": true, | |
| "vocab_size": 262144 | |
| } | |