Text Generation
Transformers
PyTorch
Safetensors
English
lightning
conversational
generative
custom_code
Instructions to use Aobangaming/lightning-30m-ft with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Aobangaming/lightning-30m-ft with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="Aobangaming/lightning-30m-ft", trust_remote_code=True) messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoModelForCausalLM model = AutoModelForCausalLM.from_pretrained("Aobangaming/lightning-30m-ft", trust_remote_code=True, device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use Aobangaming/lightning-30m-ft with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "Aobangaming/lightning-30m-ft" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Aobangaming/lightning-30m-ft", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/Aobangaming/lightning-30m-ft
- SGLang
How to use Aobangaming/lightning-30m-ft 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 "Aobangaming/lightning-30m-ft" \ --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": "Aobangaming/lightning-30m-ft", "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 "Aobangaming/lightning-30m-ft" \ --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": "Aobangaming/lightning-30m-ft", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use Aobangaming/lightning-30m-ft with Docker Model Runner:
docker model run hf.co/Aobangaming/lightning-30m-ft
Download config.json from Aobangaming/lightning-30m-ft: direct link, hf CLI and curl.
- Browser
- Download file 425 Bytes
-
https://huggingface.co/Aobangaming/lightning-30m-ft/resolve/389abf4c896bc6d1971c16098617e342a4d7e3eb/config.json
- Command line
-
hf download hf://Aobangaming/lightning-30m-ft@389abf4c896bc6d1971c16098617e342a4d7e3eb/config.json
-
curl -L -o config.json https://huggingface.co/Aobangaming/lightning-30m-ft/resolve/389abf4c896bc6d1971c16098617e342a4d7e3eb/config.json
425 Bytes
| { | |
| "architectures": [ | |
| "LightningForCausalLM" | |
| ], | |
| "d_model": 256, | |
| "dropout": 0.1, | |
| "dtype": "float32", | |
| "max_seq_len": 160, | |
| "model_type": "lightning", | |
| "nhead": 4, | |
| "num_layers": 4, | |
| "transformers_version": "4.57.3", | |
| "vocab_size": 50000, | |
| "auto_map": { | |
| "AutoConfig": "configuration_lightning.LightningConfig", | |
| "AutoModelForCausalLM": "modeling_lightning.LightningForCausalLM" | |
| } | |
| } |