Text Generation
MLX
Safetensors
gemma4
autocomplete
grammar-correction
lora
conversational
4-bit precision
Instructions to use nikimoriOne/Pretype-One with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- MLX
How to use nikimoriOne/Pretype-One with MLX:
# Make sure mlx-lm is installed # pip install --upgrade mlx-lm # Generate text with mlx-lm from mlx_lm import load, generate model, tokenizer = load("nikimoriOne/Pretype-One") prompt = "Write a story about Einstein" messages = [{"role": "user", "content": prompt}] prompt = tokenizer.apply_chat_template( messages, add_generation_prompt=True ) text = generate(model, tokenizer, prompt=prompt, verbose=True) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- LM Studio
- Pi
How to use nikimoriOne/Pretype-One with Pi:
Start the MLX server
# Install MLX LM: uv tool install mlx-lm # Start a local OpenAI-compatible server: mlx_lm.server --model "nikimoriOne/Pretype-One"
Configure the model in Pi
# Install Pi: npm install -g @earendil-works/pi-coding-agent # Add to ~/.pi/agent/models.json: { "providers": { "mlx-lm": { "baseUrl": "http://localhost:8080/v1", "api": "openai-completions", "apiKey": "none", "models": [ { "id": "nikimoriOne/Pretype-One" } ] } } }Run Pi
# Start Pi in your project directory: pi
- MLX LM
How to use nikimoriOne/Pretype-One with MLX LM:
Generate or start a chat session
# Install MLX LM uv tool install mlx-lm # Interactive chat REPL mlx_lm.chat --model "nikimoriOne/Pretype-One"
Run an OpenAI-compatible server
# Install MLX LM uv tool install mlx-lm # Start the server mlx_lm.server --model "nikimoriOne/Pretype-One" # Calling the OpenAI-compatible server with curl curl -X POST "http://localhost:8080/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "nikimoriOne/Pretype-One", "messages": [ {"role": "user", "content": "Hello"} ] }' - Hermes Agent
How to use nikimoriOne/Pretype-One with Hermes Agent:
Start the MLX server
# Install MLX LM: uv tool install mlx-lm # Start a local OpenAI-compatible server: mlx_lm.server --model "nikimoriOne/Pretype-One"
Configure Hermes
# Install Hermes: curl -fsSL https://hermes-agent.nousresearch.com/install.sh | bash hermes setup # Point Hermes at the local server: hermes config set model.provider custom hermes config set model.base_url http://127.0.0.1:8080/v1 hermes config set model.default nikimoriOne/Pretype-One
Run Hermes
hermes
- Atomic Chat
- OpenClaw
How to use nikimoriOne/Pretype-One with OpenClaw:
Start the MLX server
# Install MLX LM: uv tool install mlx-lm # Start a local OpenAI-compatible server: mlx_lm.server --model "nikimoriOne/Pretype-One"
Configure OpenClaw
# Install OpenClaw: npm install -g openclaw@latest # Register the local server and set it as the default model: openclaw onboard --non-interactive --mode local \ --auth-choice custom-api-key \ --custom-base-url http://127.0.0.1:8080/v1 \ --custom-model-id "nikimoriOne/Pretype-One" \ --custom-provider-id mlx-lm \ --custom-compatibility openai \ --custom-text-input \ --accept-risk \ --skip-health
Run OpenClaw
openclaw agent --local --agent main --message "Hello from Hugging Face"
Card: the name Pretype One, the judged reply figure
Browse files
README.md
CHANGED
|
@@ -13,9 +13,9 @@ tags:
|
|
| 13 |
- lora
|
| 14 |
---
|
| 15 |
|
| 16 |
-
#
|
| 17 |
|
| 18 |
-
|
| 19 |
One 1.5 GB download does four jobs:
|
| 20 |
|
| 21 |
- raw-text autocomplete (no chat template), with the weights in `model.safetensors`;
|
|
@@ -55,6 +55,7 @@ E2B 4-bit for autocomplete and its instruct build for the chat jobs: two files,
|
|
| 55 |
| Fix: typo line restored exactly, 510 rows | 49% | 79% |
|
| 56 |
| Fix: change proposed on a clean line | 52 of 170 | 6 of 170 |
|
| 57 |
| Reply: answered, in the right language, 380 conversations | 96% | 96% |
|
|
|
|
| 58 |
| Rewrite: answered, right language, right length, 400 rows | 74% | 86% |
|
| 59 |
| Peak memory of the process | 6.0 GiB | 2.1 GiB |
|
| 60 |
| Energy per suggestion, one session | 1048 mJ | 946 mJ |
|
|
@@ -64,8 +65,8 @@ E2B 4-bit for autocomplete and its instruct build for the chat jobs: two files,
|
|
| 64 |
|
| 65 |
- **Rewrites can come back unchanged.** 34 of 400 rewrite requests gave the input text back. This
|
| 66 |
occurs most where a small edit is correct.
|
| 67 |
-
- **
|
| 68 |
-
|
| 69 |
- **Rewrites are slower than on the instruct build:** 2.5 ms for each output character against
|
| 70 |
1.8 ms. The adapter is the cause.
|
| 71 |
- **Rare tokens are gone.** Text that needs a removed token costs more tokens. News text lost
|
|
@@ -84,7 +85,7 @@ from huggingface_hub import snapshot_download
|
|
| 84 |
from mlx_lm import generate
|
| 85 |
from mlx_lm.utils import load_model, load_tokenizer
|
| 86 |
|
| 87 |
-
path = Path(snapshot_download("nikimoriOne/
|
| 88 |
model, _ = load_model(path, strict=False)
|
| 89 |
tokenizer = load_tokenizer(path)
|
| 90 |
print(generate(model, tokenizer, prompt="The quick brown fox", max_tokens=20))
|
|
|
|
| 13 |
- lora
|
| 14 |
---
|
| 15 |
|
| 16 |
+
# Pretype One
|
| 17 |
|
| 18 |
+
One model for typing, fixes and replies. It is a smaller Gemma 4 E2B (4-bit MLX) for [Pretype](https://github.com/nikiomori/Pretype), a macOS autocomplete app.
|
| 19 |
One 1.5 GB download does four jobs:
|
| 20 |
|
| 21 |
- raw-text autocomplete (no chat template), with the weights in `model.safetensors`;
|
|
|
|
| 55 |
| Fix: typo line restored exactly, 510 rows | 49% | 79% |
|
| 56 |
| Fix: change proposed on a clean line | 52 of 170 | 6 of 170 |
|
| 57 |
| Reply: answered, in the right language, 380 conversations | 96% | 96% |
|
| 58 |
+
| Reply: on topic, by a judge model, 380 conversations | 85% | 90% (p=0.04, trend) |
|
| 59 |
| Rewrite: answered, right language, right length, 400 rows | 74% | 86% |
|
| 60 |
| Peak memory of the process | 6.0 GiB | 2.1 GiB |
|
| 61 |
| Energy per suggestion, one session | 1048 mJ | 946 mJ |
|
|
|
|
| 65 |
|
| 66 |
- **Rewrites can come back unchanged.** 34 of 400 rewrite requests gave the input text back. This
|
| 67 |
occurs most where a small edit is correct.
|
| 68 |
+
- **Rewrites are measured for form, not for sense.** The test looks at the language and the
|
| 69 |
+
length. No judge read the rewrites.
|
| 70 |
- **Rewrites are slower than on the instruct build:** 2.5 ms for each output character against
|
| 71 |
1.8 ms. The adapter is the cause.
|
| 72 |
- **Rare tokens are gone.** Text that needs a removed token costs more tokens. News text lost
|
|
|
|
| 85 |
from mlx_lm import generate
|
| 86 |
from mlx_lm.utils import load_model, load_tokenizer
|
| 87 |
|
| 88 |
+
path = Path(snapshot_download("nikimoriOne/Pretype-One"))
|
| 89 |
model, _ = load_model(path, strict=False)
|
| 90 |
tokenizer = load_tokenizer(path)
|
| 91 |
print(generate(model, tokenizer, prompt="The quick brown fox", max_tokens=20))
|