Text Generation
Transformers
PyTorch
English
custom-architecture
rope
rmsnorm
swiglu
flash-attention
16k-context
Eval Results (legacy)
Instructions to use Austin207/Map-NEO with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Austin207/Map-NEO with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="Austin207/Map-NEO")# Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("Austin207/Map-NEO", dtype="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps
- vLLM
How to use Austin207/Map-NEO with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "Austin207/Map-NEO" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Austin207/Map-NEO", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/Austin207/Map-NEO
- SGLang
How to use Austin207/Map-NEO 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 "Austin207/Map-NEO" \ --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": "Austin207/Map-NEO", "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 "Austin207/Map-NEO" \ --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": "Austin207/Map-NEO", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use Austin207/Map-NEO with Docker Model Runner:
docker model run hf.co/Austin207/Map-NEO
| #!/usr/bin/env python3 | |
| # Run MAP-NEO Mini training pipeline | |
| import subprocess | |
| import sys | |
| from pathlib import Path | |
| def run_command(cmd, description): | |
| """Run a command and handle errors""" | |
| print(f"\n{'='*50}") | |
| print(f"Running: {description}") | |
| print(f"Command: {cmd}") | |
| print(f"{'='*50}") | |
| result = subprocess.run(cmd, shell=True, capture_output=True, text=True) | |
| if result.returncode != 0: | |
| print(f"Error in {description}:") | |
| print(result.stderr) | |
| sys.exit(1) | |
| else: | |
| print(f"Success: {description}") | |
| if result.stdout: | |
| print(result.stdout) | |
| def main(): | |
| print("MAP-NEO Mini Training Pipeline") | |
| print("Optimized for RTX 5070 8GB VRAM") | |
| # Step 1: Data preprocessing | |
| if not Path("data/tokens/packed_1024.txt").exists(): | |
| print("\nStep 1: Data preprocessing") | |
| run_command( | |
| "python data_prep.py --num_docs 20000 --seq_length 1024", | |
| "Data preprocessing" | |
| ) | |
| else: | |
| print("\nSkipping data preprocessing (data exists)") | |
| # Step 2: Model training | |
| print("\nStep 2: Starting model training") | |
| run_command( | |
| "python train_neo.py", | |
| "Model training" | |
| ) | |
| print("\n" + "="*50) | |
| print("Training pipeline completed!") | |
| print("Check checkpoints/ directory for saved models") | |
| print("="*50) | |
| if __name__ == "__main__": | |
| main() | |