Instructions to use FlameF0X/LFM2.5-1.2B-Thinking-CodeX with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use FlameF0X/LFM2.5-1.2B-Thinking-CodeX with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="FlameF0X/LFM2.5-1.2B-Thinking-CodeX") 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("FlameF0X/LFM2.5-1.2B-Thinking-CodeX") model = AutoModelForCausalLM.from_pretrained("FlameF0X/LFM2.5-1.2B-Thinking-CodeX", 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 FlameF0X/LFM2.5-1.2B-Thinking-CodeX with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "FlameF0X/LFM2.5-1.2B-Thinking-CodeX" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "FlameF0X/LFM2.5-1.2B-Thinking-CodeX", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/FlameF0X/LFM2.5-1.2B-Thinking-CodeX
- SGLang
How to use FlameF0X/LFM2.5-1.2B-Thinking-CodeX 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 "FlameF0X/LFM2.5-1.2B-Thinking-CodeX" \ --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": "FlameF0X/LFM2.5-1.2B-Thinking-CodeX", "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 "FlameF0X/LFM2.5-1.2B-Thinking-CodeX" \ --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": "FlameF0X/LFM2.5-1.2B-Thinking-CodeX", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use FlameF0X/LFM2.5-1.2B-Thinking-CodeX with Docker Model Runner:
docker model run hf.co/FlameF0X/LFM2.5-1.2B-Thinking-CodeX
Update README.md
Browse files
README.md
CHANGED
|
@@ -14,7 +14,7 @@ datasets:
|
|
| 14 |
---
|
| 15 |
|
| 16 |
<div align="center">
|
| 17 |
-
<img src="https://
|
| 18 |
</div>
|
| 19 |
|
| 20 |
# LFM2.5-1.2B-Thinking-CodeX (Liquid CodeX)
|
|
|
|
| 14 |
---
|
| 15 |
|
| 16 |
<div align="center">
|
| 17 |
+
<img src="https://cas-bridge.xethub.hf.co/xet-bridge-us/6a16d14b1be3900fa1d42a40/b72f4fd9f53eec4928d2c81aae15120fd05eee4cfa7d924c92f91d1baf2decc2?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Content-Sha256=UNSIGNED-PAYLOAD&X-Amz-Credential=cas%2F20260527%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20260527T111544Z&X-Amz-Expires=3600&X-Amz-Signature=9cd7099b2e7af90f57bc13c9f2bfab3383941bf73bb831f223cca1920c16e7e7&X-Amz-SignedHeaders=host&X-Xet-Cas-Uid=6615494716917dfdc645c44e&response-content-disposition=inline%3B+filename*%3DUTF-8%27%27liquid-codex-banner.png%3B+filename%3D%22liquid-codex-banner.png%22%3B&response-content-type=image%2Fpng&x-amz-checksum-mode=ENABLED&x-id=GetObject&Expires=1779884144&Policy=eyJTdGF0ZW1lbnQiOlt7IkNvbmRpdGlvbiI6eyJEYXRlTGVzc1RoYW4iOnsiQVdTOkVwb2NoVGltZSI6MTc3OTg4NDE0NH19LCJSZXNvdXJjZSI6Imh0dHBzOi8vY2FzLWJyaWRnZS54ZXRodWIuaGYuY28veGV0LWJyaWRnZS11cy82YTE2ZDE0YjFiZTM5MDBmYTFkNDJhNDAvYjcyZjRmZDlmNTNlZWM0OTI4ZDJjODFhYWUxNTEyMGZkMDVlZWU0Y2ZhN2Q5MjRjOTJmOTFkMWJhZjJkZWNjMioifV19&Signature=p0jugfF%7EtFbBEhSH5kwsBrsfNoadOYJDu49JFI%7E9C9Hzk%7E6rFA07NU8zv-sx7y1-ryny4z7GVuMxJGhbvbcaoIhU7QKAEOQhMviv0b5Lw5GIFdCS8Io%7EK0Wokb9Q6iL985qUSX7ErhD2gNfV8Vn7RKsgQSRqq9azGOCETqYNGKTY-4yOMf9w5RPSXcyo2MhsXedpheUq%7Es1NHuHwZW8xsYT35z5TwrVQkbxaF9JQvI6fWfb69oFAK%7EZzB59MwTkTzXuxzyqlbPR3GXkhjo7VxTQ89o611jKeCy9t5scCf6DjF7JudYQgHq8QX1Fg8Gq2lbO%7EC-FRLgfpvl7vvFbTeA__&Key-Pair-Id=K2L8F4GPSG1IFC" alt="Liquid CodeX" style="width: 100%; max-width: 100%; height: auto; display: inline-block; margin-bottom: 0.5em; margin-top: 0.5em; reading-order: 20px; border-radius: 20px;"/>
|
| 18 |
</div>
|
| 19 |
|
| 20 |
# LFM2.5-1.2B-Thinking-CodeX (Liquid CodeX)
|