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/riemann/device.py from OpenPeerAI/My-Name-is-Riemann-Prerelease: direct link, hf CLI and curl.
- Browser
- Download file 2.28 kB
-
https://huggingface.co/OpenPeerAI/My-Name-is-Riemann-Prerelease/resolve/main/training/riemann/device.py
- Command line
-
hf download hf://OpenPeerAI/My-Name-is-Riemann-Prerelease/training/riemann/device.py
-
curl -L -o device.py https://huggingface.co/OpenPeerAI/My-Name-is-Riemann-Prerelease/resolve/main/training/riemann/device.py
2.28 kB
| from __future__ import annotations | |
| import logging | |
| import os | |
| import torch | |
| logger = logging.getLogger("riemann.device") | |
| try: | |
| import torch_directml | |
| _DML_AVAILABLE = True | |
| except ImportError: | |
| torch_directml = None | |
| _DML_AVAILABLE = False | |
| def directml_available() -> bool: | |
| return _DML_AVAILABLE and torch_directml.device_count() > 0 | |
| def main_device() -> torch.device: | |
| if directml_available(): | |
| return torch_directml.device(0) | |
| if torch.cuda.is_available(): | |
| return torch.device("cuda", 0) | |
| logger.warning("No DirectML or CUDA device available; training will run on CPU.") | |
| return torch.device("cpu") | |
| def secondary_device() -> torch.device: | |
| if directml_available() and torch_directml.device_count() > 1: | |
| return torch_directml.device(1) | |
| if torch.cuda.is_available() and torch.cuda.device_count() > 1: | |
| return torch.device("cuda", 1) | |
| return main_device() | |
| def cpu_device() -> torch.device: | |
| return torch.device("cpu") | |
| def configure_cpu_threads(num_threads: int | None = None) -> int: | |
| threads = num_threads or os.cpu_count() or 1 | |
| torch.set_num_threads(threads) | |
| try: | |
| torch.set_num_interop_threads(max(1, threads // 2)) | |
| except RuntimeError: | |
| pass | |
| return threads | |
| def describe_devices() -> dict: | |
| info = { | |
| "directml_available": directml_available(), | |
| "cuda_available": torch.cuda.is_available(), | |
| "devices": [], | |
| } | |
| if directml_available(): | |
| for i in range(torch_directml.device_count()): | |
| info["devices"].append( | |
| { | |
| "backend": "directml", | |
| "index": i, | |
| "name": torch_directml.device_name(i), | |
| } | |
| ) | |
| if torch.cuda.is_available(): | |
| for i in range(torch.cuda.device_count()): | |
| info["devices"].append( | |
| {"backend": "cuda", "index": i, "name": torch.cuda.get_device_name(i)} | |
| ) | |
| info["cpu_logical_cores"] = os.cpu_count() | |
| info["cpu_threads_configured"] = torch.get_num_threads() | |
| return info | |
| if __name__ == "__main__": | |
| import json | |
| print(json.dumps(describe_devices(), indent=2)) | |