Text Generation
Transformers
Safetensors
OpenPeerLLM
English
Arabic
riemann_openpeer
amd
ntk
code
fsdp
rocm
coding
mi325x
decoder
code gen
directml
openpeer
ryzen-ai
reasoning
rewriting
multimodal
paraphrase
prerelease
ntk-trainer
growth-ladder
style-transfer
text-rewriting
riemann-computing
progressive-growth
custom_code
Eval Results (legacy)
Instructions to use OpenPeerAI/My-Name-is-Riemann-Prerelease with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use OpenPeerAI/My-Name-is-Riemann-Prerelease with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="OpenPeerAI/My-Name-is-Riemann-Prerelease", trust_remote_code=True)# pip install -U transformers accelerate # Load model directly from transformers import AutoModelForCausalLM model = AutoModelForCausalLM.from_pretrained("OpenPeerAI/My-Name-is-Riemann-Prerelease", trust_remote_code=True, device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use OpenPeerAI/My-Name-is-Riemann-Prerelease with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "OpenPeerAI/My-Name-is-Riemann-Prerelease" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "OpenPeerAI/My-Name-is-Riemann-Prerelease", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/OpenPeerAI/My-Name-is-Riemann-Prerelease
- SGLang
How to use OpenPeerAI/My-Name-is-Riemann-Prerelease 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 "OpenPeerAI/My-Name-is-Riemann-Prerelease" \ --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": "OpenPeerAI/My-Name-is-Riemann-Prerelease", "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 "OpenPeerAI/My-Name-is-Riemann-Prerelease" \ --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": "OpenPeerAI/My-Name-is-Riemann-Prerelease", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use OpenPeerAI/My-Name-is-Riemann-Prerelease with Docker Model Runner:
docker model run hf.co/OpenPeerAI/My-Name-is-Riemann-Prerelease
Download training/scripts/grow_and_continue.py from OpenPeerAI/My-Name-is-Riemann-Prerelease: direct link, hf CLI and curl.
- Browser
- Download file 2.44 kB
-
https://huggingface.co/OpenPeerAI/My-Name-is-Riemann-Prerelease/resolve/main/training/scripts/grow_and_continue.py
- Command line
-
hf download hf://OpenPeerAI/My-Name-is-Riemann-Prerelease/training/scripts/grow_and_continue.py
-
curl -L -o grow_and_continue.py https://huggingface.co/OpenPeerAI/My-Name-is-Riemann-Prerelease/resolve/main/training/scripts/grow_and_continue.py
2.44 kB
| from __future__ import annotations | |
| import argparse | |
| import logging | |
| import sys | |
| from pathlib import Path | |
| sys.path.insert(0, str(Path(__file__).resolve().parent.parent)) | |
| from transformers import AutoTokenizer | |
| from riemann.growth_ladder import get_stage, next_stage | |
| from riemann.growth import load_checkpoint_and_grow | |
| from riemann.paths import CHECKPOINT_ROOT | |
| logger = logging.getLogger("riemann.grow_and_continue") | |
| TOKENIZER_NAME = "gpt2" | |
| def main() -> None: | |
| logging.basicConfig( | |
| level=logging.INFO, format="%(asctime)s %(levelname)s %(message)s" | |
| ) | |
| parser = argparse.ArgumentParser( | |
| description=__doc__, formatter_class=argparse.RawDescriptionHelpFormatter | |
| ) | |
| parser.add_argument( | |
| "--from-stage", required=True, help="the stage you just finished training" | |
| ) | |
| parser.add_argument( | |
| "--to-stage", | |
| default=None, | |
| help="target stage name (default: the next one in the ladder)", | |
| ) | |
| parser.add_argument("--checkpoint-root", default=str(CHECKPOINT_ROOT)) | |
| args = parser.parse_args() | |
| from_stage = get_stage(args.from_stage) | |
| to_stage = ( | |
| get_stage(args.to_stage) if args.to_stage else next_stage(from_stage.name) | |
| ) | |
| from_dir = Path(args.checkpoint_root) / from_stage.name | |
| to_dir = Path(args.checkpoint_root) / to_stage.name | |
| if not (from_dir / "config.json").exists(): | |
| raise FileNotFoundError( | |
| f"No checkpoint found at {from_dir} -- train this stage first" | |
| ) | |
| logger.info("Growing %s -> %s", from_stage.name, to_stage.name) | |
| grown_model = load_checkpoint_and_grow(str(from_dir), to_stage) | |
| to_dir.mkdir(parents=True, exist_ok=True) | |
| grown_model.save_pretrained(str(to_dir)) | |
| tokenizer = AutoTokenizer.from_pretrained(TOKENIZER_NAME) | |
| tokenizer.save_pretrained(str(to_dir)) | |
| n_params = sum((p.numel() for p in grown_model.parameters())) | |
| logger.info( | |
| "Saved grown checkpoint to %s (%d params, ~%.2fB)", | |
| to_dir, | |
| n_params, | |
| n_params / 1000000000.0, | |
| ) | |
| if not to_stage.feasible_on_this_machine: | |
| logger.warning( | |
| "%s is marked not feasible on this machine; expect this to be slow or run out of memory", | |
| to_stage.name, | |
| ) | |
| logger.info("Next: python scripts/pretrain.py --stage %s --resume", to_stage.name) | |
| if __name__ == "__main__": | |
| main() | |