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")# 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: 2,320 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 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 | {
"args": {
"init": "../runs/nano-pt/final",
"shape": "nano",
"train_rows": null,
"epochs": 2.0,
"batch": 256,
"lr": 0.002,
"wd": 0.1,
"warmup": 50,
"replay_every": 12,
"replay_batch": 4,
"eval_every": 1000,
"eval_rows": 1000,
"max_minutes": 50.0,
"seed": 1234,
"out": "nano-sft"
},
"log": [
{
"step": 1000,
"train_loss": 0.006621028296649456,
"eval_target_loss": 0.07434787717331105,
"minutes": 0.7496363361676533
},
{
"step": 2000,
"train_loss": 0.02178449183702469,
"eval_target_loss": 0.05123574915808273,
"minutes": 1.4465561429659526
},
{
"step": 3000,
"train_loss": 0.00805601105093956,
"eval_target_loss": 0.04877272646884206,
"minutes": 2.1609952886899313
},
{
"step": 4000,
"train_loss": 0.0015760211972519755,
"eval_target_loss": 0.0506566401789748,
"minutes": 2.850797164440155
},
{
"step": 5000,
"train_loss": 0.0027423014398664236,
"eval_target_loss": 0.04380449522909304,
"minutes": 3.5392218232154846
},
{
"step": 6000,
"train_loss": 0.001060945214703679,
"eval_target_loss": 0.0389024249297705,
"minutes": 4.238372592131297
},
{
"step": 7000,
"train_loss": 0.0005649410304613411,
"eval_target_loss": 0.03259135582334248,
"minutes": 4.983746925989787
},
{
"step": 8000,
"train_loss": 0.0010784538462758064,
"eval_target_loss": 0.028708800912080383,
"minutes": 5.700136307875315
},
{
"step": 9000,
"train_loss": 0.0004312685050535947,
"eval_target_loss": 0.02426343787667973,
"minutes": 6.410312342643738
},
{
"step": 10000,
"train_loss": 0.00011572329822229221,
"eval_target_loss": 0.02548710253615743,
"minutes": 7.112147303422292
},
{
"step": 11000,
"train_loss": 0.0005688337259925902,
"eval_target_loss": 0.02789109825700458,
"minutes": 7.8145731012026465
},
{
"step": 12000,
"train_loss": 6.69505971018225e-05,
"eval_target_loss": 0.0214684495689006,
"minutes": 8.530480217933654
},
{
"step": 13000,
"train_loss": 0.0004814007261302322,
"eval_target_loss": 0.02294556570453032,
"minutes": 9.222708662350973
},
{
"step": 13115,
"train_loss": 3.8525613490492105e-05,
"eval_target_loss": 0.022417631390016398,
"minutes": 9.301433749993642
}
]
} |