Text Generation
Transformers
ONNX
Safetensors
PyTorch
Transformers.js
Portuguese
llama
portuguese
pt-pt
ptpt
european-portuguese
portugal
llama-architecture
small-model
lightweight
tiny-llm
50M
52M-params
efficient
low-resource
on-device
edge
pretrained
wikipedia
wikimedia
bpe
byte-level-bpe
tokenizer-32k
chatml
instruction-tuned
sft
supervised-fine-tuning
causal-lm
conversational
chatbot
torch
huggingface
bf16
gqa
swiglu
rope
open-source
mit
model-card
text-generation-inference
Instructions to use brunuu/PequeninaLM with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use brunuu/PequeninaLM with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="brunuu/PequeninaLM") 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("brunuu/PequeninaLM") model = AutoModelForCausalLM.from_pretrained("brunuu/PequeninaLM", 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]:])) - Transformers.js
How to use brunuu/PequeninaLM with Transformers.js:
// npm i @huggingface/transformers import { pipeline } from '@huggingface/transformers'; // Allocate pipeline const pipe = await pipeline('text-generation', 'brunuu/PequeninaLM'); - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use brunuu/PequeninaLM with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "brunuu/PequeninaLM" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "brunuu/PequeninaLM", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/brunuu/PequeninaLM
- SGLang
How to use brunuu/PequeninaLM 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 "brunuu/PequeninaLM" \ --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": "brunuu/PequeninaLM", "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 "brunuu/PequeninaLM" \ --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": "brunuu/PequeninaLM", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use brunuu/PequeninaLM with Docker Model Runner:
docker model run hf.co/brunuu/PequeninaLM
File size: 6,478 Bytes
9a3f627 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 | <svg xmlns="http://www.w3.org/2000/svg" width="720" height="560" viewBox="0 0 720 560" role="img" aria-labelledby="titulo descricao">
<style>
.fundo { fill: #fcfcfb; stroke: #e1e0d9; stroke-width: 1; }
.titulo { font: 600 18px system-ui, -apple-system, 'Segoe UI', sans-serif; fill: #0b0b0b; }
.seccao { font: 600 14px system-ui, -apple-system, 'Segoe UI', sans-serif; fill: #0b0b0b; }
.subtitulo { font: 400 13px system-ui, -apple-system, 'Segoe UI', sans-serif; fill: #52514e; }
.nome { font: 400 13px system-ui, -apple-system, 'Segoe UI', sans-serif; fill: #52514e; }
.nome.nosso { font-weight: 600; fill: #0b0b0b; }
.valor { font: 400 12px system-ui, -apple-system, 'Segoe UI', sans-serif; fill: #52514e; font-variant-numeric: tabular-nums; }
.valor.nosso { font-weight: 600; fill: #0b0b0b; }
.eixo { font: 400 11px system-ui, -apple-system, 'Segoe UI', sans-serif; fill: #898781; }
.grelha { stroke: #e1e0d9; stroke-width: 1; }
.barra { fill: #c8c7c0; }
.barra.nosso { fill: #2a78d6; }
.ponto { fill: #898781; stroke: #fcfcfb; stroke-width: 2; }
.ponto.nosso { fill: #2a78d6; }
.rotulo { font: 400 12px system-ui, -apple-system, 'Segoe UI', sans-serif; fill: #52514e; }
.rotulo.nosso { font-weight: 600; font-size: 13px; fill: #0b0b0b; }
@media (prefers-color-scheme: dark) {
.fundo { fill: #1a1a19; stroke: #2c2c2a; }
.titulo, .seccao, .nome.nosso, .valor.nosso, .rotulo.nosso { fill: #f0efec; }
.subtitulo, .nome, .valor, .rotulo { fill: #c3c2b7; }
.grelha { stroke: #2c2c2a; }
.barra { fill: #4a4a46; }
.barra.nosso, .ponto.nosso { fill: #3987e5; }
.ponto { stroke: #1a1a19; }
}
</style>
<title id="titulo">PT-PT e raciocínio</title>
<desc id="descricao">AMALIA-9B-DPO: P3B3 · fala PT-PT 85.6%, PiQA · raciocínio do dia a dia 72.5%; PequeninaLM-50M: P3B3 · fala PT-PT 77.2%, PiQA · raciocínio do dia a dia 53.5%; Salamandra-7B: P3B3 · fala PT-PT 32.8%, PiQA · raciocínio do dia a dia 70.4%; Apertus-8B: P3B3 · fala PT-PT 26.8%, PiQA · raciocínio do dia a dia 73.4%; Llama 3.1-8B: P3B3 · fala PT-PT 24.1%, PiQA · raciocínio do dia a dia 68.5%; Gervasio-8B: P3B3 · fala PT-PT 25.7%, PiQA · raciocínio do dia a dia 69.1%; Qwen 3-8B: P3B3 · fala PT-PT 15.7%, PiQA · raciocínio do dia a dia 64.7%; Gemma 3-12B: P3B3 · fala PT-PT 26.5%, PiQA · raciocínio do dia a dia 69.0%</desc>
<rect class="fundo" x="0.5" y="0.5" width="719" height="559" rx="12"/>
<text class="titulo" x="24" y="34">PT-PT e raciocínio</text>
<text class="subtitulo" x="24" y="54">P3B3 e PiQA · os outros modelos são os valores publicados</text>
<line class="grelha" x1="70.0" y1="92" x2="70.0" y2="496"/>
<text class="eixo" x="70.0" y="514" text-anchor="middle">0%</text>
<line class="grelha" x1="138.66666666666669" y1="92" x2="138.66666666666669" y2="496"/>
<text class="eixo" x="138.66666666666669" y="514" text-anchor="middle">10%</text>
<line class="grelha" x1="207.33333333333334" y1="92" x2="207.33333333333334" y2="496"/>
<text class="eixo" x="207.33333333333334" y="514" text-anchor="middle">20%</text>
<line class="grelha" x1="276.0" y1="92" x2="276.0" y2="496"/>
<text class="eixo" x="276.0" y="514" text-anchor="middle">30%</text>
<line class="grelha" x1="344.6666666666667" y1="92" x2="344.6666666666667" y2="496"/>
<text class="eixo" x="344.6666666666667" y="514" text-anchor="middle">40%</text>
<line class="grelha" x1="413.33333333333337" y1="92" x2="413.33333333333337" y2="496"/>
<text class="eixo" x="413.33333333333337" y="514" text-anchor="middle">50%</text>
<line class="grelha" x1="482.0" y1="92" x2="482.0" y2="496"/>
<text class="eixo" x="482.0" y="514" text-anchor="middle">60%</text>
<line class="grelha" x1="550.6666666666666" y1="92" x2="550.6666666666666" y2="496"/>
<text class="eixo" x="550.6666666666666" y="514" text-anchor="middle">70%</text>
<line class="grelha" x1="619.3333333333334" y1="92" x2="619.3333333333334" y2="496"/>
<text class="eixo" x="619.3333333333334" y="514" text-anchor="middle">80%</text>
<line class="grelha" x1="688.0" y1="92" x2="688.0" y2="496"/>
<text class="eixo" x="688.0" y="514" text-anchor="middle">90%</text>
<line class="grelha" x1="70" y1="496.0" x2="688" y2="496.0"/>
<text class="eixo" x="62" y="500.0" text-anchor="end">50%</text>
<line class="grelha" x1="70" y1="361.33333333333337" x2="688" y2="361.33333333333337"/>
<text class="eixo" x="62" y="365.33333333333337" text-anchor="end">60%</text>
<line class="grelha" x1="70" y1="226.6666666666668" x2="688" y2="226.6666666666668"/>
<text class="eixo" x="62" y="230.6666666666668" text-anchor="end">70%</text>
<line class="grelha" x1="70" y1="92.0" x2="688" y2="92.0"/>
<text class="eixo" x="62" y="96.0" text-anchor="end">80%</text>
<text class="nome" x="379.0" y="540" text-anchor="middle">P3B3 · fala PT-PT →</text>
<text class="nome" x="28" y="294.0" text-anchor="middle" transform="rotate(-90 28 294.0)">PiQA · raciocínio do dia a dia →</text>
<circle class="ponto" cx="657.7866666666666" cy="193.0000000000001" r="5"/>
<circle class="ponto" cx="295.2266666666667" cy="221.2800000000001" r="5"/>
<circle class="ponto" cx="254.0266666666667" cy="180.88000000000005" r="5"/>
<circle class="ponto" cx="235.48666666666668" cy="246.86666666666662" r="5"/>
<circle class="ponto" cx="246.47333333333333" cy="238.7866666666668" r="5"/>
<circle class="ponto" cx="177.80666666666667" cy="298.03999999999996" r="5"/>
<circle class="ponto" cx="251.96666666666667" cy="240.13333333333344" r="5"/>
<circle class="ponto nosso" cx="599.832" cy="448.32800000000003" r="6"/>
<text class="rotulo nosso" x="590.832" y="452.32800000000003" text-anchor="end">PequeninaLM-50M</text>
<text class="rotulo" x="648.7866666666666" y="197.0000000000001" text-anchor="end">AMALIA-9B-DPO</text>
<text class="rotulo" x="304.2266666666667" y="225.2800000000001" text-anchor="start">Salamandra-7B</text>
<text class="rotulo" x="263.0266666666667" y="184.88000000000005" text-anchor="start">Apertus-8B</text>
<text class="rotulo" x="226.48666666666668" y="250.86666666666662" text-anchor="end">Llama 3.1-8B</text>
<text class="rotulo" x="246.47333333333333" y="227.7866666666668" text-anchor="middle">Gervasio-8B</text>
<text class="rotulo" x="186.80666666666667" y="302.03999999999996" text-anchor="start">Qwen 3-8B</text>
<text class="rotulo" x="260.9666666666667" y="244.13333333333344" text-anchor="start">Gemma 3-12B</text>
</svg> |