Text Generation
Transformers
Safetensors
English
llama
small-language-model
efficient
edge-deployment
speculative-decoding
150m-parameters
tpu-trained
research
low-resource
portimbria
gqa
fineweb
conversational
Eval Results (legacy)
text-generation-inference
Instructions to use StentorLabs/Portimbria-150M with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use StentorLabs/Portimbria-150M with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="StentorLabs/Portimbria-150M") 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("StentorLabs/Portimbria-150M") model = AutoModelForCausalLM.from_pretrained("StentorLabs/Portimbria-150M", 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 StentorLabs/Portimbria-150M with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "StentorLabs/Portimbria-150M" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "StentorLabs/Portimbria-150M", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/StentorLabs/Portimbria-150M
- SGLang
How to use StentorLabs/Portimbria-150M 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 "StentorLabs/Portimbria-150M" \ --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": "StentorLabs/Portimbria-150M", "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 "StentorLabs/Portimbria-150M" \ --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": "StentorLabs/Portimbria-150M", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use StentorLabs/Portimbria-150M with Docker Model Runner:
docker model run hf.co/StentorLabs/Portimbria-150M
Update README.md
Browse files
README.md
CHANGED
|
@@ -53,24 +53,22 @@ model-index:
|
|
| 53 |
value: 18
|
| 54 |
---
|
| 55 |
|
|
|
|
|
|
|
| 56 |
# Portimbria-150M
|
| 57 |
|
| 58 |

|
| 59 |
-
|
| 60 |

|
| 61 |
-
|
| 62 |

|
| 63 |
-
|
| 64 |

|
| 65 |
-
|
| 66 |

|
| 67 |
-
|
| 68 |

|
| 69 |
-
|
| 70 |

|
| 71 |
|
| 72 |
[](https://huggingface.co/StentorLabs)
|
| 73 |
|
|
|
|
|
|
|
| 74 |
> π¬ **Research Artifact & Base Language Model.** Portimbria-150M is a next-token predictor β not a chat assistant. It has no safety tuning and should not be deployed in user-facing applications without fine-tuning first. It is, however, a high-quality open foundation: **fine-tune it, quantize it, convert it, distill from it, run LoRA on it, adapt it to your domain, or build anything else you can imagine** β and please publish your results! See [Intended Uses](#use-cases--intended-uses) for details.
|
| 75 |
|
| 76 |
> π‘ **Built by a solo 14-year-old developer, on a laptop, for $0.** Every model StentorLabs has released β including this one β was conceived, designed, coded, and trained without a budget, a team, a GPU cluster, or institutional support. The total cost of producing Portimbria-150M was zero dollars, using free Kaggle TPU quota and publicly available datasets. This is what democratized AI research looks like.
|
|
@@ -97,7 +95,7 @@ GQA training stability is worth noting: Stentor2-12M-Preview experienced minor t
|
|
| 97 |
|
| 98 |
---
|
| 99 |
|
| 100 |
-
π Table of Contents
|
| 101 |
|
| 102 |
1. [What Is This?](#what-is-this)
|
| 103 |
|
|
@@ -1243,6 +1241,10 @@ Google Cloud TPU v5e-8 on Kaggle free compute. 4096-token context,
|
|
| 1243 |
|
| 1244 |
Questions, benchmarks, or feedback: [StentorLabs@gmail.com](mailto:StentorLabs@gmail.com) or open a [discussion](https://huggingface.co/StentorLabs/Portimbria-150M/discussions).
|
| 1245 |
|
| 1246 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1247 |
|
| 1248 |
-
|
|
|
|
| 53 |
value: 18
|
| 54 |
---
|
| 55 |
|
| 56 |
+
<div align="center">
|
| 57 |
+
|
| 58 |
# Portimbria-150M
|
| 59 |
|
| 60 |

|
|
|
|
| 61 |

|
|
|
|
| 62 |

|
|
|
|
| 63 |

|
|
|
|
| 64 |

|
|
|
|
| 65 |

|
|
|
|
| 66 |

|
| 67 |
|
| 68 |
[](https://huggingface.co/StentorLabs)
|
| 69 |
|
| 70 |
+
</div>
|
| 71 |
+
|
| 72 |
> π¬ **Research Artifact & Base Language Model.** Portimbria-150M is a next-token predictor β not a chat assistant. It has no safety tuning and should not be deployed in user-facing applications without fine-tuning first. It is, however, a high-quality open foundation: **fine-tune it, quantize it, convert it, distill from it, run LoRA on it, adapt it to your domain, or build anything else you can imagine** β and please publish your results! See [Intended Uses](#use-cases--intended-uses) for details.
|
| 73 |
|
| 74 |
> π‘ **Built by a solo 14-year-old developer, on a laptop, for $0.** Every model StentorLabs has released β including this one β was conceived, designed, coded, and trained without a budget, a team, a GPU cluster, or institutional support. The total cost of producing Portimbria-150M was zero dollars, using free Kaggle TPU quota and publicly available datasets. This is what democratized AI research looks like.
|
|
|
|
| 95 |
|
| 96 |
---
|
| 97 |
|
| 98 |
+
## π Table of Contents
|
| 99 |
|
| 100 |
1. [What Is This?](#what-is-this)
|
| 101 |
|
|
|
|
| 1241 |
|
| 1242 |
Questions, benchmarks, or feedback: [StentorLabs@gmail.com](mailto:StentorLabs@gmail.com) or open a [discussion](https://huggingface.co/StentorLabs/Portimbria-150M/discussions).
|
| 1243 |
|
| 1244 |
+
<div align="center">
|
| 1245 |
+
|
| 1246 |
+
Made with β€οΈ by [StentorLabs](https://huggingface.co/StentorLabs)
|
| 1247 |
+
|
| 1248 |
+
_Democratizing AI through accessible, efficient models β trained on free compute, shared with everyone._
|
| 1249 |
|
| 1250 |
+
</div>
|