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")# 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
Update README.md
Browse files
README.md
CHANGED
|
@@ -9,6 +9,8 @@ tags:
|
|
| 9 |
- lfm2
|
| 10 |
datasets:
|
| 11 |
- FlameF0X/arXiv-AI-ML
|
|
|
|
|
|
|
| 12 |
---
|
| 13 |
|
| 14 |
# LFM2 Model - Pretrained on arXiv AI/ML Papers
|
|
@@ -35,4 +37,4 @@ This is a LFM2 (Liquid Foundation Model 2) architecture pretrained on the arXiv
|
|
| 35 |
- **Batch Size:** 4
|
| 36 |
- **Learning Rate:** 0.0003
|
| 37 |
- **Epochs:** 10
|
| 38 |
-
- **Final Loss:** 1.9985
|
|
|
|
| 9 |
- lfm2
|
| 10 |
datasets:
|
| 11 |
- FlameF0X/arXiv-AI-ML
|
| 12 |
+
pipeline_tag: text-generation
|
| 13 |
+
library_name: transformers
|
| 14 |
---
|
| 15 |
|
| 16 |
# LFM2 Model - Pretrained on arXiv AI/ML Papers
|
|
|
|
| 37 |
- **Batch Size:** 4
|
| 38 |
- **Learning Rate:** 0.0003
|
| 39 |
- **Epochs:** 10
|
| 40 |
+
- **Final Loss:** 1.9985
|