Text Classification
Transformers
Safetensors
lfm2
feature-extraction
liquid
lfm2.5
bidirectional
masked-lm
encoder
custom_code
Instructions to use LiquidAI/LFM2.5-Encoder-350M-Prompt-Router with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use LiquidAI/LFM2.5-Encoder-350M-Prompt-Router with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-classification", model="LiquidAI/LFM2.5-Encoder-350M-Prompt-Router", trust_remote_code=True)# Load model directly from transformers import AutoTokenizer, AutoModel tokenizer = AutoTokenizer.from_pretrained("LiquidAI/LFM2.5-Encoder-350M-Prompt-Router", trust_remote_code=True) model = AutoModel.from_pretrained("LiquidAI/LFM2.5-Encoder-350M-Prompt-Router", trust_remote_code=True, device_map="auto") - Notebooks
- Google Colab
- Kaggle
Upload folder using huggingface_hub
Browse files- config.json +65 -0
- model.safetensors +3 -0
- tokenizer.json +0 -0
- tokenizer_config.json +11 -0
config.json
ADDED
|
@@ -0,0 +1,65 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"architectures": [
|
| 3 |
+
"Lfm2BidirForSequenceRouting"
|
| 4 |
+
],
|
| 5 |
+
"auto_map": {
|
| 6 |
+
"AutoModel": "modeling_lfm2_bidir_theirs.Lfm2BidirectionalModel_theirs",
|
| 7 |
+
"AutoModelForMaskedLM": "modeling_lfm2_bidir_theirs.Lfm2BidirForMaskedLM_theirs"
|
| 8 |
+
},
|
| 9 |
+
"block_auto_adjust_ff_dim": true,
|
| 10 |
+
"block_dim": 1024,
|
| 11 |
+
"block_ffn_dim_multiplier": 1.0,
|
| 12 |
+
"block_mlp_init_scale": 1.0,
|
| 13 |
+
"block_multiple_of": 256,
|
| 14 |
+
"block_norm_eps": 1e-05,
|
| 15 |
+
"block_out_init_scale": 1.0,
|
| 16 |
+
"block_use_swiglu": true,
|
| 17 |
+
"block_use_xavier_init": true,
|
| 18 |
+
"bos_token_id": 1,
|
| 19 |
+
"conv_L_cache": 3,
|
| 20 |
+
"conv_bias": false,
|
| 21 |
+
"conv_dim": 1024,
|
| 22 |
+
"conv_dim_out": 1024,
|
| 23 |
+
"conv_use_xavier_init": true,
|
| 24 |
+
"dtype": "float32",
|
| 25 |
+
"eos_token_id": 7,
|
| 26 |
+
"hidden_size": 1024,
|
| 27 |
+
"initializer_range": 0.02,
|
| 28 |
+
"intermediate_size": 6656,
|
| 29 |
+
"layer_types": [
|
| 30 |
+
"conv",
|
| 31 |
+
"conv",
|
| 32 |
+
"full_attention",
|
| 33 |
+
"conv",
|
| 34 |
+
"conv",
|
| 35 |
+
"full_attention",
|
| 36 |
+
"conv",
|
| 37 |
+
"conv",
|
| 38 |
+
"full_attention",
|
| 39 |
+
"conv",
|
| 40 |
+
"full_attention",
|
| 41 |
+
"conv",
|
| 42 |
+
"full_attention",
|
| 43 |
+
"conv",
|
| 44 |
+
"full_attention",
|
| 45 |
+
"conv"
|
| 46 |
+
],
|
| 47 |
+
"max_position_embeddings": 128000,
|
| 48 |
+
"model_type": "lfm2",
|
| 49 |
+
"norm_eps": 1e-05,
|
| 50 |
+
"num_attention_heads": 16,
|
| 51 |
+
"num_heads": 16,
|
| 52 |
+
"num_hidden_layers": 16,
|
| 53 |
+
"num_key_value_heads": 8,
|
| 54 |
+
"pad_token_id": 0,
|
| 55 |
+
"rope_parameters": {
|
| 56 |
+
"rope_theta": 1000000.0,
|
| 57 |
+
"rope_type": "default"
|
| 58 |
+
},
|
| 59 |
+
"rule_proj_dim": 256,
|
| 60 |
+
"tie_word_embeddings": true,
|
| 61 |
+
"transformers_version": "5.1.0",
|
| 62 |
+
"use_cache": false,
|
| 63 |
+
"use_pos_enc": true,
|
| 64 |
+
"vocab_size": 65536
|
| 65 |
+
}
|
model.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:9fab23eeb312d951bca8a0dfa4068ca4be4d55283a66c6fe5cbe9cf1e14e631d
|
| 3 |
+
size 1420051928
|
tokenizer.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
tokenizer_config.json
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"backend": "tokenizers",
|
| 3 |
+
"bos_token": "<|startoftext|>",
|
| 4 |
+
"clean_up_tokenization_spaces": false,
|
| 5 |
+
"eos_token": "<|im_end|>",
|
| 6 |
+
"is_local": false,
|
| 7 |
+
"mask_token": "<|mask|>",
|
| 8 |
+
"model_max_length": 1000000000000000019884624838656,
|
| 9 |
+
"pad_token": "<|pad|>",
|
| 10 |
+
"tokenizer_class": "TokenizersBackend"
|
| 11 |
+
}
|