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/count_corpus_tokens.py from OpenPeerAI/My-Name-is-Riemann-Prerelease: direct link, hf CLI and curl.
- Browser
- Download file 1.47 kB
-
https://huggingface.co/OpenPeerAI/My-Name-is-Riemann-Prerelease/resolve/main/training/scripts/count_corpus_tokens.py
- Command line
-
hf download hf://OpenPeerAI/My-Name-is-Riemann-Prerelease/training/scripts/count_corpus_tokens.py
-
curl -L -o count_corpus_tokens.py https://huggingface.co/OpenPeerAI/My-Name-is-Riemann-Prerelease/resolve/main/training/scripts/count_corpus_tokens.py
1.47 kB
| import sys, time, json | |
| from pathlib import Path | |
| from transformers import AutoTokenizer | |
| tok = AutoTokenizer.from_pretrained("gpt2") | |
| p = Path(r"C:\RiemannModel\data\pretrain_corpus.txt") | |
| regions = {} | |
| total_tokens = 0 | |
| total_docs = 0 | |
| t0 = time.time() | |
| batch = [] | |
| def flush(batch): | |
| global total_tokens | |
| enc = tok(batch, add_special_tokens=False)["input_ids"] | |
| n = sum(len(e) + 1 for e in enc) | |
| total_tokens += n | |
| return n | |
| cum = 0 | |
| boundaries = [] | |
| with p.open("r", encoding="utf-8") as fh: | |
| for i, line in enumerate(fh): | |
| text = line.replace("\u2029", "\n").strip() | |
| if not text: | |
| continue | |
| batch.append(text) | |
| total_docs += 1 | |
| if len(batch) == 2000: | |
| flush(batch) | |
| batch = [] | |
| if total_docs % 500000 == 0: | |
| print( | |
| f"{total_docs:,} docs, {total_tokens/1e9:.3f}B tokens, {time.time()-t0:.0f}s", | |
| flush=True, | |
| ) | |
| boundaries.append((total_docs, total_tokens)) | |
| if batch: | |
| flush(batch) | |
| out = { | |
| "docs": total_docs, | |
| "tokens": total_tokens, | |
| "tokens_per_doc": total_tokens / max(1, total_docs), | |
| "cumulative_every_500k_docs": boundaries, | |
| } | |
| Path(r"C:\RiemannModel\data\corpus_token_count.json").write_text( | |
| json.dumps(out, indent=2) | |
| ) | |
| print( | |
| json.dumps( | |
| {k: v for k, v in out.items() if k != "cumulative_every_500k_docs"}, indent=2 | |
| ) | |
| ) | |