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
File size: 2,280 Bytes
db3982a | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 | 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))
|