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
Download upload.py from openmodelai/Galactic-2.5-Mini: direct link, hf CLI and curl.
- Browser
- Download file 997 Bytes
-
https://huggingface.co/openmodelai/Galactic-2.5-Mini/resolve/main/upload.py
- Command line
-
hf download hf://openmodelai/Galactic-2.5-Mini/upload.py
-
curl -L -o upload.py https://huggingface.co/openmodelai/Galactic-2.5-Mini/resolve/main/upload.py
997 Bytes
| """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.') | |