Text Generation
Transformers
Safetensors
English
llama
raspberry-pi
gpio
embedded
structured-output
json
tiny
Eval Results (legacy)
text-generation-inference
Instructions to use AwaleSagar/gpio-llm-nano-rpi5 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use AwaleSagar/gpio-llm-nano-rpi5 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="AwaleSagar/gpio-llm-nano-rpi5")# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("AwaleSagar/gpio-llm-nano-rpi5") model = AutoModelForCausalLM.from_pretrained("AwaleSagar/gpio-llm-nano-rpi5", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use AwaleSagar/gpio-llm-nano-rpi5 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "AwaleSagar/gpio-llm-nano-rpi5" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "AwaleSagar/gpio-llm-nano-rpi5", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/AwaleSagar/gpio-llm-nano-rpi5
- SGLang
How to use AwaleSagar/gpio-llm-nano-rpi5 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 "AwaleSagar/gpio-llm-nano-rpi5" \ --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": "AwaleSagar/gpio-llm-nano-rpi5", "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 "AwaleSagar/gpio-llm-nano-rpi5" \ --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": "AwaleSagar/gpio-llm-nano-rpi5", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use AwaleSagar/gpio-llm-nano-rpi5 with Docker Model Runner:
docker model run hf.co/AwaleSagar/gpio-llm-nano-rpi5
File size: 1,436 Bytes
8579c16 | 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 | {
"args": {
"shape": "nano",
"tokens": 550000000,
"batch": 256,
"lr": 0.003,
"wd": 0.1,
"warmup": 100,
"min_lr_frac": 0.1,
"eval_every": 1000,
"max_minutes": 45.0,
"seed": 1234,
"out": "nano-pt",
"compile": true
},
"params": 4960704,
"log": [
{
"step": 1000,
"train_loss": 4.157930374145508,
"val_loss": 4.101281976699829,
"minutes": 1.265407105286916
},
{
"step": 2000,
"train_loss": 4.010364532470703,
"val_loss": 3.921313500404358,
"minutes": 2.4889028827349344
},
{
"step": 3000,
"train_loss": 3.8780674934387207,
"val_loss": 3.8422478675842284,
"minutes": 3.7334064563115437
},
{
"step": 4000,
"train_loss": 3.891343593597412,
"val_loss": 3.785443663597107,
"minutes": 4.978402447700501
},
{
"step": 5000,
"train_loss": 3.8154168128967285,
"val_loss": 3.730230283737183,
"minutes": 6.2154850920041405
},
{
"step": 6000,
"train_loss": 3.758894443511963,
"val_loss": 3.6891664028167725,
"minutes": 7.451739505926768
},
{
"step": 7000,
"train_loss": 3.7148094177246094,
"val_loss": 3.650411367416382,
"minutes": 8.679173755645753
},
{
"step": 8000,
"train_loss": 3.737409830093384,
"val_loss": 3.6295988082885744,
"minutes": 9.910523466269176
},
{
"step": 8391,
"train_loss": 3.695378065109253,
"val_loss": 3.625276494026184,
"minutes": 10.390244070688883
}
]
} |