Text Generation
Transformers
Safetensors
English
lfm2
causal-lm
arxiv
research-assistant
small-language-model
Instructions to use FlameF0X/LFM2-Research with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use FlameF0X/LFM2-Research with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="FlameF0X/LFM2-Research")# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("FlameF0X/LFM2-Research") model = AutoModelForCausalLM.from_pretrained("FlameF0X/LFM2-Research", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use FlameF0X/LFM2-Research with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "FlameF0X/LFM2-Research" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "FlameF0X/LFM2-Research", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/FlameF0X/LFM2-Research
- SGLang
How to use FlameF0X/LFM2-Research 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-Research" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "FlameF0X/LFM2-Research", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'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-Research" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "FlameF0X/LFM2-Research", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use FlameF0X/LFM2-Research with Docker Model Runner:
docker model run hf.co/FlameF0X/LFM2-Research
Commit History
-
Update README.md
Verified signature88343a9
-
Update README.md
Verified signature65fef4f -
Update README.md
Verified signature20856f5 -
Update README.md
Verified signature29e17d1 -
Upload folder using huggingface_hub
Verified signature4bc8dee -
Update README.md
Verified signature902d260 -
Update README.md
Verified signature508847d -
Update README.md
Verified signature404c458 -
Update README.md
Verified signaturec69d22e -
Update README.md
Verified signature35ea6cf -
Update README.md
Verified signaturec60efb4 -
Upload folder using huggingface_hub
Verified signature0a591fb -
Update README.md
Verified signature396e104 -
Update README.md
Verified signature53c1d54 -
Create LICENSE
Verified signatureff9d4cf -
Update README.md
Verified signaturebb47e62 -
Update README.md
Verified signatureebf9bb2 -
Upload folder using huggingface_hub
Verified signature7e62711 -
Update README.md
Verified signature5dca8ab -
Update README.md
Verified signaturea8df498 -
Upload folder using huggingface_hub
Verified signature0ade45d -
initial commit
Verified signature2781c52