Text Generation
Transformers
Safetensors
PyTorch
English
French
Spanish
lfm2
classification
inference-only
structured-generation
constrained-decoding
apple-silicon
conversational
Instructions to use notnotsamuel/LFM2.5-350M-RLCD with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use notnotsamuel/LFM2.5-350M-RLCD with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="notnotsamuel/LFM2.5-350M-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("notnotsamuel/LFM2.5-350M-RLCD") model = AutoModelForCausalLM.from_pretrained("notnotsamuel/LFM2.5-350M-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 notnotsamuel/LFM2.5-350M-RLCD with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "notnotsamuel/LFM2.5-350M-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": "notnotsamuel/LFM2.5-350M-RLCD", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/notnotsamuel/LFM2.5-350M-RLCD
- SGLang
How to use notnotsamuel/LFM2.5-350M-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 "notnotsamuel/LFM2.5-350M-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": "notnotsamuel/LFM2.5-350M-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 "notnotsamuel/LFM2.5-350M-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": "notnotsamuel/LFM2.5-350M-RLCD", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use notnotsamuel/LFM2.5-350M-RLCD with Docker Model Runner:
docker model run hf.co/notnotsamuel/LFM2.5-350M-RLCD
Download RELEASE_MANIFEST.json from notnotsamuel/LFM2.5-350M-RLCD: direct link, hf CLI and curl.
- Browser
- Download file 4.05 kB
-
https://huggingface.co/notnotsamuel/LFM2.5-350M-RLCD/resolve/main/RELEASE_MANIFEST.json
- Command line
-
hf download hf://notnotsamuel/LFM2.5-350M-RLCD/RELEASE_MANIFEST.json
-
curl -L -o RELEASE_MANIFEST.json https://huggingface.co/notnotsamuel/LFM2.5-350M-RLCD/resolve/main/RELEASE_MANIFEST.json
4.05 kB
| { | |
| "target_repository": "notnotsamuel/LFM2.5-350M-RLCD", | |
| "status": "release", | |
| "base_model": "LiquidAI/LFM2.5-350M", | |
| "base_revision": "9e6c6ccf47cd318696e137d381a7ded8fe4df09f", | |
| "contains_weights": true, | |
| "weights_modified": false, | |
| "training_performed": false, | |
| "files_sha256": { | |
| ".gitignore": "ab9c214c2e9ba6890a5bb5fff3d50f842aa8f6ba773de52b369c37952c7accc7", | |
| "BASE_MODEL_MANIFEST.json": "2c49487820eea7773c6513950497d296d694f91e8ec1e070e9b667a8e04fc121", | |
| "LICENSE": "4d28ca14dedc0b3d0fcc2b3339f0e79931faa33874f3d24f522183a8fc70068c", | |
| "LICENSE-CODE": "de146682eff5da167d12c415f2c99489b82e7470f42cd244d96d73b616c10db9", | |
| "README.md": "ff299e25ff6de1f35e55145fc9342d24191f5926e81799384c48638a33a1316d", | |
| "chat_template.jinja": "ba551d58630afa3190b1be3602e28301f3d2e9bbac978dfc49d6d825171648b6", | |
| "config.json": "720b43d6ddc2ed25be23eed355aefcf342434a176dedad23dbe0a5e3ac24bbb8", | |
| "docs/BASE_MODEL_LICENSE.txt": "4d28ca14dedc0b3d0fcc2b3339f0e79931faa33874f3d24f522183a8fc70068c", | |
| "docs/BENCHMARKING.md": "fb6dce047ac5d75d29d8e676e47435de9ccdc6764806d03296211fb333997483", | |
| "docs/EXECUTION_NOTES.md": "99d249858f7c8ae989b062472cefc97bab84d59e2f1de1c4458d3a563332370f", | |
| "docs/IMPLEMENTATION_REVIEW.md": "c96a100e186c1774994b66bdc26b87ba9fba6fdd65de3b62a110912d44e1d018", | |
| "generation_config.json": "0ec7d228c4de7e3453e98bf6910c7eb7841e87fede63ea11c0f75a5c64e1c3c3", | |
| "modal_benchmark.py": "83a3acc6d10076fe92a1158a8dea4419eeba1fcb65c038be7d4c38ec0d2dedd6", | |
| "model.safetensors": "1c9c77a4471a7f590f85240f74ed1fc26df7fbde88c3006724e2f93ca993ea4e", | |
| "requirements.txt": "8d93dba213b38f4887f037e676be1c84ab282699b6ff9af3c658c8d92958cbda", | |
| "results/REPORT.md": "681497dfd365bb765b804b3f3edd10ae688cf7611df99b22bc92bd6916a80983", | |
| "results/environment-macos.txt": "de423da237740a6179eb7bbaa7d95bb9f68d01a487e7dc02ea07e1077ac87fd8", | |
| "results/exploratory/h100.json": "ea730603a341010fe898bb279d844c7f3b469a46f1ff12bb783f87cdda9c5f89", | |
| "results/exploratory/l40s.json": "18743230031e9353aab411dc36f9358693bf81299e8d92ae444ddadbc63f1b68", | |
| "results/exploratory/m2-max-stress.json": "34d2af8adba22cdcbca5eb7cea6aee9a8ef8a02dbde9b3d41f21c0c78e419d07", | |
| "results/exploratory/m2-max.json": "98276a551a17fe6f6b4ba1a405b927a451f30febf543f1a03e42717eb0bdad5b", | |
| "results/h100-stress.json": "66a1875c4135d4d804ac67ebf100073c54d5d4985392aab63f2873924e083780", | |
| "results/h100.json": "19175879d3846b731235404044b41b14d2ca275fb500be74b8037036e5d9aac7", | |
| "results/l40s-stress.json": "dcc1f8d9849bd0e61cda5c195ced9a9e9ceda009bd19c5d0e853cd47c0e419dc", | |
| "results/l40s.json": "f7c17e45fd74857bc762c29f7bb22c183dafcd2cba96a2f667776531e5100964", | |
| "results/local-tests.log": "e314d1a839f2641113cae18e2942722a3f133cba3ae5885bc8201d030d0bda45", | |
| "results/m2-max-stress.json": "16d58d42d51630c3a14a025d36156294ca3efcc1965a04b2e2dd828bb811c8dd", | |
| "results/m2-max.json": "662b74e1cc6d04741e098560c27abe77d3e90a820e5c54897352bffd0364f766", | |
| "rlcd/__init__.py": "f4b1ec7f50976e6e65a1d90407b3a44a5518c7495e308580e74a48127ec209f5", | |
| "rlcd/benchmark.py": "262e898a428d215b4f256c9aa9dff1f1df48e976d99904f56e97c67a2e64fb0f", | |
| "rlcd/engine.py": "f6231cae0413fce75a5468533e44923cbc0ef796eb038e4c779fc149ec543736", | |
| "rlcd/stress_tasks.py": "fe77231fc70881585df0fb65b68340dd62fba6aa8dffa9dbebd5c398b79317b2", | |
| "rlcd/tasks.py": "91fc7e3decb7b3969a3efae3d02580c58b364ac45064e20c7620a2b3f2037509", | |
| "scripts/bundle_base.py": "1b263b71e54c7f39e1b057342db1de69f8553ba5227ce895fb275c5bc51fd914", | |
| "scripts/prepare_release.py": "40970480486eb354db0febab0d91ea5a114c6b50743727adcebac2caf4e8bdec", | |
| "scripts/report.py": "1746103bd116be7b29b5d861bd8358292710e18401182c5cda1aaa3833abe269", | |
| "tests/test_engine.py": "b173dd17c537eff8c0af91f920460c99f1888aa9a86a15ee33c2eafda6f90669", | |
| "tokenizer.json": "df1d8d5ec5d091b460562ffd545e4a5e91d17d4a0db7ebe733be34ed374377bd", | |
| "tokenizer_config.json": "3701f370c70034d06e28947ff51c1063983393319f429e3ce58f06a45fae67cc" | |
| } | |
| } | |