Text Generation
Transformers
Russian
English
gpt2
causal-lm
experimental
trained-from-scratch
spacemodel
undertrained
Instructions to use openmodelai/Galactic-2.5-Mini with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use openmodelai/Galactic-2.5-Mini with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="openmodelai/Galactic-2.5-Mini")# pip install -U transformers accelerate # Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("openmodelai/Galactic-2.5-Mini", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use openmodelai/Galactic-2.5-Mini with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "openmodelai/Galactic-2.5-Mini" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "openmodelai/Galactic-2.5-Mini", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/openmodelai/Galactic-2.5-Mini
- SGLang
How to use openmodelai/Galactic-2.5-Mini 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 "openmodelai/Galactic-2.5-Mini" \ --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": "openmodelai/Galactic-2.5-Mini", "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 "openmodelai/Galactic-2.5-Mini" \ --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": "openmodelai/Galactic-2.5-Mini", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use openmodelai/Galactic-2.5-Mini with Docker Model Runner:
docker model run hf.co/openmodelai/Galactic-2.5-Mini
File size: 997 Bytes
1440c49 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 | """Run locally AFTER reviewing the model card and logging in to Hugging Face.
Creates a private repo by default. No tokens are embedded in this project.
"""
import argparse
from pathlib import Path
from huggingface_hub import HfApi
p = argparse.ArgumentParser()
p.add_argument('--repo', required=True, help='YOUR_NAMESPACE/Galactic-2.5-Mini')
p.add_argument('--public', action='store_true', help='Create a public repository')
p.add_argument('--folder', default=str(Path(__file__).resolve().parent/'model'))
a = p.parse_args()
if len(a.repo.split('/')) != 2:
p.error('Use YOUR_NAMESPACE/Galactic-2.5-Mini')
api = HfApi()
api.create_repo(repo_id=a.repo, repo_type='model', private=not a.public, exist_ok=True)
api.upload_folder(repo_id=a.repo, repo_type='model', folder_path=a.folder,
commit_message='Upload Galactic 2.5 Mini: experimental 50M short-run checkpoint')
print(f'https://huggingface.co/{a.repo}')
print('Existing repository visibility is unchanged; check repository Settings.')
|