Text Generation
Transformers
Safetensors
English
qwen3
littlelearner
bounded
base
text-generation-inference
Instructions to use littlelearner/littlelearner-5b-base with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use littlelearner/littlelearner-5b-base with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="littlelearner/littlelearner-5b-base")# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("littlelearner/littlelearner-5b-base") model = AutoModelForCausalLM.from_pretrained("littlelearner/littlelearner-5b-base", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use littlelearner/littlelearner-5b-base with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "littlelearner/littlelearner-5b-base" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "littlelearner/littlelearner-5b-base", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/littlelearner/littlelearner-5b-base
- SGLang
How to use littlelearner/littlelearner-5b-base 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 "littlelearner/littlelearner-5b-base" \ --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": "littlelearner/littlelearner-5b-base", "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 "littlelearner/littlelearner-5b-base" \ --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": "littlelearner/littlelearner-5b-base", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use littlelearner/littlelearner-5b-base with Docker Model Runner:
docker model run hf.co/littlelearner/littlelearner-5b-base
Cards: capless examples (cap baked into generation_config); drop vLLM note + research note
Browse files
README.md
CHANGED
|
@@ -35,16 +35,12 @@ repo = "manueldeprada/littlelearner-5b-bounded-base"
|
|
| 35 |
tok = AutoTokenizer.from_pretrained(repo)
|
| 36 |
model = AutoModelForCausalLM.from_pretrained(repo, dtype="bfloat16", device_map="cuda")
|
| 37 |
ids = tok("The sum of 2 and 3 is", return_tensors="pt").to(model.device)
|
| 38 |
-
print(tok.decode(model.generate(**ids
|
| 39 |
```
|
| 40 |
|
| 41 |
```python
|
| 42 |
# vLLM
|
| 43 |
-
from vllm import LLM
|
| 44 |
llm = LLM("manueldeprada/littlelearner-5b-bounded-base")
|
| 45 |
-
print(llm.generate(["The sum of 2 and 3 is"]
|
| 46 |
```
|
| 47 |
-
|
| 48 |
-
> **vLLM note:** vLLM JIT-compiles CUDA kernels, so it needs a CUDA toolkit (`nvcc`) on PATH. On an HPC cluster, `module load cuda/13.x cudnn/9.x` (match your torch CUDA build). On a box with no toolkit, pass `LLM(repo, enforce_eager=True)`. Verified on vLLM 0.15 and 0.23 (and transformers ≥ 4.51).
|
| 49 |
-
|
| 50 |
-
> Research artifact. The **bounded** models carry an intentional K–5 knowledge boundary (they cannot model above-grade-5 material). Base models are **not** instruction-tuned.
|
|
|
|
| 35 |
tok = AutoTokenizer.from_pretrained(repo)
|
| 36 |
model = AutoModelForCausalLM.from_pretrained(repo, dtype="bfloat16", device_map="cuda")
|
| 37 |
ids = tok("The sum of 2 and 3 is", return_tensors="pt").to(model.device)
|
| 38 |
+
print(tok.decode(model.generate(**ids)[0], skip_special_tokens=True))
|
| 39 |
```
|
| 40 |
|
| 41 |
```python
|
| 42 |
# vLLM
|
| 43 |
+
from vllm import LLM
|
| 44 |
llm = LLM("manueldeprada/littlelearner-5b-bounded-base")
|
| 45 |
+
print(llm.generate(["The sum of 2 and 3 is"])[0].outputs[0].text)
|
| 46 |
```
|
|
|
|
|
|
|
|
|
|
|
|