Instructions to use lennartcb/pflm1 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use lennartcb/pflm1 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="lennartcb/pflm1")# pip install -U transformers accelerate # Load model directly from transformers import AutoModelForCausalLM model = AutoModelForCausalLM.from_pretrained("lennartcb/pflm1", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use lennartcb/pflm1 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "lennartcb/pflm1" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "lennartcb/pflm1", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/lennartcb/pflm1
- SGLang
How to use lennartcb/pflm1 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 "lennartcb/pflm1" \ --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": "lennartcb/pflm1", "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 "lennartcb/pflm1" \ --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": "lennartcb/pflm1", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use lennartcb/pflm1 with Docker Model Runner:
docker model run hf.co/lennartcb/pflm1
add citation
Browse files
README.md
CHANGED
|
@@ -47,3 +47,16 @@ text = primes(10_000) # "0011010100..." ten thousand
|
|
| 47 |
bits = model.bits_per_byte(text) # bits per byte, one entry each
|
| 48 |
print(bits[:500].mean(), bits[-500:].mean()) # the first 500 digits vs. the last 500
|
| 49 |
```
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 47 |
bits = model.bits_per_byte(text) # bits per byte, one entry each
|
| 48 |
print(bits[:500].mean(), bits[-500:].mean()) # the first 500 digits vs. the last 500
|
| 49 |
```
|
| 50 |
+
|
| 51 |
+
## Citation
|
| 52 |
+
|
| 53 |
+
[Learning to Learn a Language](https://arxiv.org/abs/2610.05879)
|
| 54 |
+
|
| 55 |
+
```bibtex
|
| 56 |
+
@article{carstensbehrens2026learning,
|
| 57 |
+
title = {Learning to Learn a Language},
|
| 58 |
+
author = {Carstens-Behrens, Lennart and Fr{\"o}hlich, Holger},
|
| 59 |
+
journal = {arXiv preprint arXiv:2610.05879},
|
| 60 |
+
year = {2026},
|
| 61 |
+
}
|
| 62 |
+
```
|