Instructions to use kucukkanat/LFM2.5-Encoder-350M-Diffusion-ONNX with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers.js
How to use kucukkanat/LFM2.5-Encoder-350M-Diffusion-ONNX with Transformers.js:
// npm i @huggingface/transformers import { pipeline } from '@huggingface/transformers'; // Allocate pipeline const pipe = await pipeline('text-generation', 'kucukkanat/LFM2.5-Encoder-350M-Diffusion-ONNX');
| { | |
| "model_type": "lfm2-bidirectional", | |
| "architectures": [ | |
| "MaskedLmGraph" | |
| ], | |
| "task": "masked-diffusion", | |
| "source_model": "LiquidAI/LFM2.5-Encoder-350M-Diffusion", | |
| "hidden_size": 1024, | |
| "vocab_size": 65536, | |
| "real_vocab_size": 64402, | |
| "num_hidden_layers": 16, | |
| "layer_types": [ | |
| "conv", | |
| "conv", | |
| "full_attention", | |
| "conv", | |
| "conv", | |
| "full_attention", | |
| "conv", | |
| "conv", | |
| "full_attention", | |
| "conv", | |
| "full_attention", | |
| "conv", | |
| "full_attention", | |
| "conv", | |
| "full_attention", | |
| "conv" | |
| ], | |
| "max_position_embeddings": 128000, | |
| "transformers.js_config": { | |
| "kv_cache_dtype": null, | |
| "use_external_data_format": false | |
| }, | |
| "onnx": { | |
| "inputs": [ | |
| "input_ids", | |
| "attention_mask" | |
| ], | |
| "outputs": [ | |
| "logits", | |
| "last_hidden_state" | |
| ] | |
| }, | |
| "diffusion": { | |
| "mask_token_id": 16, | |
| "mask_token": "<|mask|>", | |
| "max_new_tokens": 64, | |
| "steps": 32, | |
| "block_size": 16, | |
| "temperature": 0.0, | |
| "tau": 0.9, | |
| "template": { | |
| "system": "[SYS]\n{system}\n[/SYS]\n\n", | |
| "user": "[Question]\n{user}\n[/Question]\n\n[Answer]\n", | |
| "stop": [ | |
| "[/Answer]", | |
| "[Question]", | |
| "[SYS]" | |
| ] | |
| } | |
| } | |
| } | |