Text Generation
PyTorch
GGUF
Japanese
English
japanese
little-language-model
tiny-language-model
edge-ai
embedded-ai
ex-word
llama-cpp
lm-studio
custom-code
conversational
Instructions to use ToTo-40417/EXLLM-ONI5M with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- llama.cpp
How to use ToTo-40417/EXLLM-ONI5M with llama.cpp:
Install (macOS, Linux)
curl -LsSf https://llama.app/install.sh | sh # Start a local OpenAI-compatible server with a web UI: llama serve -hf ToTo-40417/EXLLM-ONI5M:F16 # Run inference directly in the terminal: llama cli -hf ToTo-40417/EXLLM-ONI5M:F16
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama serve -hf ToTo-40417/EXLLM-ONI5M:F16 # Run inference directly in the terminal: llama cli -hf ToTo-40417/EXLLM-ONI5M:F16
Use pre-built binary
# Download pre-built binary from: # https://github.com/ggerganov/llama.cpp/releases # Start a local OpenAI-compatible server with a web UI: ./llama-server -hf ToTo-40417/EXLLM-ONI5M:F16 # Run inference directly in the terminal: ./llama-cli -hf ToTo-40417/EXLLM-ONI5M:F16
Build from source code
git clone https://github.com/ggerganov/llama.cpp.git cd llama.cpp cmake -B build cmake --build build -j --target llama-server llama-cli # Start a local OpenAI-compatible server with a web UI: ./build/bin/llama-server -hf ToTo-40417/EXLLM-ONI5M:F16 # Run inference directly in the terminal: ./build/bin/llama-cli -hf ToTo-40417/EXLLM-ONI5M:F16
Use Docker
docker model run hf.co/ToTo-40417/EXLLM-ONI5M:F16
- LM Studio
- Jan
- vLLM
How to use ToTo-40417/EXLLM-ONI5M with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "ToTo-40417/EXLLM-ONI5M" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "ToTo-40417/EXLLM-ONI5M", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/ToTo-40417/EXLLM-ONI5M:F16
- Ollama
How to use ToTo-40417/EXLLM-ONI5M with Ollama:
ollama run hf.co/ToTo-40417/EXLLM-ONI5M:F16
- Unsloth Desktop
- Docker Model Runner
How to use ToTo-40417/EXLLM-ONI5M with Docker Model Runner:
docker model run hf.co/ToTo-40417/EXLLM-ONI5M:F16
- Lemonade
How to use ToTo-40417/EXLLM-ONI5M with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull ToTo-40417/EXLLM-ONI5M:F16
Run and chat with the model
lemonade run user.EXLLM-ONI5M-F16
List all available models
lemonade list
- Atomic Chat
Download eval/heldout_gate.py from ToTo-40417/EXLLM-ONI5M: direct link, hf CLI and curl.
- Browser
- Download file 2.87 kB
-
https://huggingface.co/ToTo-40417/EXLLM-ONI5M/resolve/main/eval/heldout_gate.py
- Command line
-
hf download hf://ToTo-40417/EXLLM-ONI5M/eval/heldout_gate.py
-
curl -L -o heldout_gate.py https://huggingface.co/ToTo-40417/EXLLM-ONI5M/resolve/main/eval/heldout_gate.py
2.87 kB
| #!/usr/bin/env python3 | |
| import random,json,sys | |
| from pathlib import Path | |
| import torch | |
| sys.path.insert(0,str(Path(__file__).resolve().parents[1])) | |
| from src.infer import load_model,generate | |
| from eval.q12_roundtrip import load_q12 | |
| ANGRY=['ไฝใ','ๅใใใ','ใผใใใ','่ใใ','ไฝๅบฆ','่ฉฑใ่ใ','ใฐใใใฎ','่ณชๅใใๅ','ไป่ใ','ไธๅบฆ','ๆ็งๆธ'] | |
| # All probes below are generated after training and are not appended to any training file. | |
| rng=random.Random(773311) | |
| kana=list('ใใใใใใใใใใใใใใใใใกใคใฆใจใชใซใฌใญใฎใฏใฒใตใธใปใพใฟใใใใใใใใใใใใใใใใใใใใใใใใ ใงใฉใฐใณใถในใผใฑใดใทใบใฝ') | |
| train_prompts=set() | |
| for fn in ['data/stage1.jsonl','data/train_balanced.jsonl','data/stage3.jsonl','data/stage4_repair.jsonl','data/stage5_mathop.jsonl']: | |
| for ln in open(fn,encoding='utf8'): train_prompts.add(json.loads(ln)['prompt']) | |
| nonces=[] | |
| while len(nonces)<120: | |
| s=''.join(rng.choice(kana) for _ in range(rng.randint(5,11))) | |
| q=s+rng.choice(['ใจใฏ','ใฃใฆใชใซ','ใฎใใฟใฏ','ใใใคใใใใฆ']) | |
| if q not in train_prompts: nonces.append(q) | |
| known=[ | |
| ('ใซใปใใฎใใ ใจใใใใใ','ๆฑไบฌ'),('ใจใใใใใฏใซใปใใฎใใ ใจใ','ๆฑไบฌ'), | |
| ('ใฟใใใใใใฎใฏใชใใฉใ ','0โ'),('ใฟใใฎใใใใใใฉใใใ','0โ'), | |
| ('ใญใใฏใใใใงใชใใจใใ','cat'),('ใใฌใใใใใซใชใใ','dog'), | |
| ('ใปใใฏใใใใงใชใใ ','book'),('ใใฃใใใใใใใงใใ','school'), | |
| ('5ใซ9ใใใใใใจ','14'),('6ใ7ใใใถใใใใจ','42'), | |
| ] | |
| def run(kind): | |
| if kind=='fp32':m,tok,_=load_model('weights/EXLLM-ONI5M-v1.0-final.pt') | |
| else:m,tok,_=load_q12('weights/oni5m.q12') | |
| nr=[] | |
| for q in nonces: | |
| a,_=generate(m,tok,q,56);nr.append({'prompt':q,'output':a,'reject':'ไธๆ' in a,'persona':any(x in a for x in ANGRY)}) | |
| kr=[] | |
| for q,needle in known: | |
| a,_=generate(m,tok,q,56);kr.append({'prompt':q,'required':needle,'output':a,'pass':needle in a,'persona':any(x in a for x in ANGRY)}) | |
| return {'nonce_count':len(nr),'nonce_reject_rate':sum(x['reject'] for x in nr)/len(nr),'nonce_persona_rate':sum(x['persona'] for x in nr)/len(nr),'known_count':len(kr),'known_paraphrase_pass_rate':sum(x['pass'] for x in kr)/len(kr),'known_persona_rate':sum(x['persona'] for x in kr)/len(kr),'nonce_samples':nr[:10],'known':kr} | |
| def main(): | |
| torch.set_num_threads(5);out={'note':'post-training probes; exact prompts absent from training files','fp32':run('fp32'),'q12':run('q12')};Path('eval/heldout_gate_results.json').write_text(json.dumps(out,ensure_ascii=False,indent=2),encoding='utf8');print(json.dumps({k:{kk:vv for kk,vv in v.items() if not isinstance(vv,list)} if isinstance(v,dict) else v for k,v in out.items()},ensure_ascii=False,indent=2)) | |
| if __name__=='__main__':main() | |