Text Generation
Transformers
Safetensors
lfm2
liquid
lfm2.5
edge
parallel-constrained-decoding
structured-generation
classification
inference-only
modal
conversational
Instructions to use monotykamary/LFM2.5-2.6B-RLCD with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use monotykamary/LFM2.5-2.6B-RLCD with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="monotykamary/LFM2.5-2.6B-RLCD") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("monotykamary/LFM2.5-2.6B-RLCD") model = AutoModelForCausalLM.from_pretrained("monotykamary/LFM2.5-2.6B-RLCD", device_map="auto") messages = [ {"role": "user", "content": "Who are you?"}, ] inputs = tokenizer.apply_chat_template( messages, add_generation_prompt=True, tokenize=True, return_dict=True, return_tensors="pt", ).to(model.device) outputs = model.generate(**inputs, max_new_tokens=256) print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use monotykamary/LFM2.5-2.6B-RLCD with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "monotykamary/LFM2.5-2.6B-RLCD" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "monotykamary/LFM2.5-2.6B-RLCD", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/monotykamary/LFM2.5-2.6B-RLCD
- SGLang
How to use monotykamary/LFM2.5-2.6B-RLCD 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 "monotykamary/LFM2.5-2.6B-RLCD" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "monotykamary/LFM2.5-2.6B-RLCD", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'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 "monotykamary/LFM2.5-2.6B-RLCD" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "monotykamary/LFM2.5-2.6B-RLCD", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use monotykamary/LFM2.5-2.6B-RLCD with Docker Model Runner:
docker model run hf.co/monotykamary/LFM2.5-2.6B-RLCD
Download BASE_MODEL_MANIFEST.json from monotykamary/LFM2.5-2.6B-RLCD: direct link, hf CLI and curl.
- Browser
- Download file 2.26 kB
-
https://huggingface.co/monotykamary/LFM2.5-2.6B-RLCD/resolve/main/BASE_MODEL_MANIFEST.json
- Command line
-
hf download hf://monotykamary/LFM2.5-2.6B-RLCD/BASE_MODEL_MANIFEST.json
-
curl -L -o BASE_MODEL_MANIFEST.json https://huggingface.co/monotykamary/LFM2.5-2.6B-RLCD/resolve/main/BASE_MODEL_MANIFEST.json
2.26 kB
| { | |
| "model_id": "LiquidAI/LFM2.5-2.6B", | |
| "revision": "654f9463ce32b05d0429d76fe1f580b27d4c1ac0", | |
| "unchanged_weights": true, | |
| "files": [ | |
| { | |
| "upstream_path": "LICENSE", | |
| "release_path": "LICENSE", | |
| "sha256": "4d28ca14dedc0b3d0fcc2b3339f0e79931faa33874f3d24f522183a8fc70068c", | |
| "bytes": 10574 | |
| }, | |
| { | |
| "upstream_path": "README.md", | |
| "release_path": "UPSTREAM_README.md", | |
| "sha256": "003ceb63ec63a5b06b17f5e7b7a7d907695f037ad18720cabbcf8d8d68813f24", | |
| "bytes": 18337 | |
| }, | |
| { | |
| "upstream_path": "chat_template.jinja", | |
| "release_path": "chat_template.jinja", | |
| "sha256": "ea663864491de7ade391839479860ca95541f892f72665c73251fbd4643b1bef", | |
| "bytes": 5443 | |
| }, | |
| { | |
| "upstream_path": "config.json", | |
| "release_path": "config.json", | |
| "sha256": "480f63fa8e1efa534ae8b92774b3b53b8d6812d62a726e9ecfc866933662f273", | |
| "bytes": 1467 | |
| }, | |
| { | |
| "upstream_path": "generation_config.json", | |
| "release_path": "generation_config.json", | |
| "sha256": "7366b93f26f8830e7a94441a3d2b9f344ceb9e1e31a808e0656df40720075874", | |
| "bytes": 327 | |
| }, | |
| { | |
| "upstream_path": "model-00001-of-00002.safetensors", | |
| "release_path": "model-00001-of-00002.safetensors", | |
| "sha256": "05be188e6570a7642b4690545ab22ebf4d0a6068775dd776a452eebf738854cc", | |
| "bytes": 5329406264 | |
| }, | |
| { | |
| "upstream_path": "model-00002-of-00002.safetensors", | |
| "release_path": "model-00002-of-00002.safetensors", | |
| "sha256": "532f803a9e6f127adc124d977503b438d8cc9c18f96e0862bf6835e38867bca8", | |
| "bytes": 65021192 | |
| }, | |
| { | |
| "upstream_path": "model.safetensors.index.json", | |
| "release_path": "model.safetensors.index.json", | |
| "sha256": "1be35d0d99dc56f68e6c5b306f7d4d99b6da97d1ab41ee753832bf1495655c4a", | |
| "bytes": 21425 | |
| }, | |
| { | |
| "upstream_path": "tokenizer.json", | |
| "release_path": "tokenizer.json", | |
| "sha256": "695be7802a0e4b8a81048f0ff5ebb7fc811a0ba5a6be63dbb24deb5a81096f41", | |
| "bytes": 17905598 | |
| }, | |
| { | |
| "upstream_path": "tokenizer_config.json", | |
| "release_path": "tokenizer_config.json", | |
| "sha256": "11f1de897317b489dd09199284528382eeb17f566398b16e2039bb2266d26b09", | |
| "bytes": 363 | |
| } | |
| ] | |
| } | |