Text Generation
Transformers
ONNX
Safetensors
Transformers.js
English
llama
smollm2
lora
portfolio-assistant
webgpu
conversational
text-generation-inference
Instructions to use celestialcreator/axon-smollm2-360m with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use celestialcreator/axon-smollm2-360m with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="celestialcreator/axon-smollm2-360m") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("celestialcreator/axon-smollm2-360m") model = AutoModelForCausalLM.from_pretrained("celestialcreator/axon-smollm2-360m") 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=40) print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Transformers.js
How to use celestialcreator/axon-smollm2-360m with Transformers.js:
// npm i @huggingface/transformers import { pipeline } from '@huggingface/transformers'; // Allocate pipeline const pipe = await pipeline('text-generation', 'celestialcreator/axon-smollm2-360m'); - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use celestialcreator/axon-smollm2-360m with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "celestialcreator/axon-smollm2-360m" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "celestialcreator/axon-smollm2-360m", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/celestialcreator/axon-smollm2-360m
- SGLang
How to use celestialcreator/axon-smollm2-360m 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 "celestialcreator/axon-smollm2-360m" \ --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": "celestialcreator/axon-smollm2-360m", "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 "celestialcreator/axon-smollm2-360m" \ --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": "celestialcreator/axon-smollm2-360m", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use celestialcreator/axon-smollm2-360m with Docker Model Runner:
docker model run hf.co/celestialcreator/axon-smollm2-360m
Axon β SmolLM2-360M Portfolio Assistant
Fine-tuned SmolLM2-360M-Instruct to serve as a personal portfolio AI assistant. Runs entirely in the browser via WebGPU + Transformers.js.
What is Axon?
Axon is a client-side AI assistant embedded in a Three.js 3D portfolio website. It answers questions about the portfolio owner (Akshay Mhaskar) β work experience, skills, projects, and contact info. Zero backend, zero API costs, fully private.
Training
- Method: LoRA (rank=32, alpha=64) fine-tuning via TRL SFTTrainer
- Dataset: 1,001 curated chat examples (knowledge Q&A, refusal training, edge cases)
- Hardware: NVIDIA RTX 5090
- Base model: SmolLM2-360M-Instruct
- Precision: bf16
- Train loss: 1.33
- Eval loss: 0.94
- Token accuracy: 80%
- Training time: 6 minutes
Usage (Browser β Transformers.js)
import { pipeline } from '@huggingface/transformers';
const generator = await pipeline('text-generation', 'celestialcreator/axon-smollm2-360m', {
dtype: 'q4f16',
device: 'webgpu',
});
const result = await generator([
{ role: 'user', content: 'Who is Akshay?' }
], { max_new_tokens: 150 });
Usage (Python)
from transformers import pipeline
pipe = pipeline("text-generation", model="celestialcreator/axon-smollm2-360m")
result = pipe([{"role": "user", "content": "Who is Akshay?"}], max_new_tokens=150)
- Downloads last month
- 9
Model tree for celestialcreator/axon-smollm2-360m
Base model
HuggingFaceTB/SmolLM2-360M Quantized
HuggingFaceTB/SmolLM2-360M-Instruct