Instructions to use prateekfr/qwen3-1.7b-no-e 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 prateekfr/qwen3-1.7b-no-e 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 prateekfr/qwen3-1.7b-no-e:F16 # Run inference directly in the terminal: llama cli -hf prateekfr/qwen3-1.7b-no-e:F16
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama serve -hf prateekfr/qwen3-1.7b-no-e:F16 # Run inference directly in the terminal: llama cli -hf prateekfr/qwen3-1.7b-no-e:F16
Build from source code
git clone https://github.com/ggml-org/llama.cpp.git cd llama.cpp cmake -B build cmake --build build -j --target llama-app # Start a local OpenAI-compatible server with a web UI: ./build/bin/llama serve -hf prateekfr/qwen3-1.7b-no-e:F16 # Run inference directly in the terminal: ./build/bin/llama cli -hf prateekfr/qwen3-1.7b-no-e:F16
Use Docker
docker model run hf.co/prateekfr/qwen3-1.7b-no-e:F16
- Llama new
- LM Studio
- Jan
- vLLM
How to use prateekfr/qwen3-1.7b-no-e with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "prateekfr/qwen3-1.7b-no-e" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "prateekfr/qwen3-1.7b-no-e", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/prateekfr/qwen3-1.7b-no-e:F16
- Ollama
How to use prateekfr/qwen3-1.7b-no-e with Ollama:
ollama run hf.co/prateekfr/qwen3-1.7b-no-e:F16
- Unsloth Desktop
- Pi
How to use prateekfr/qwen3-1.7b-no-e with Pi:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf prateekfr/qwen3-1.7b-no-e:F16
Configure the model in Pi
# Install Pi: npm install -g @earendil-works/pi-coding-agent # Add to ~/.pi/agent/models.json: { "providers": { "llama-cpp": { "baseUrl": "http://localhost:9931/v1", "api": "openai-completions", "apiKey": "none", "models": [ { "id": "prateekfr/qwen3-1.7b-no-e:F16" } ] } } }Run Pi
# Start Pi in your project directory: pi
- Docker Model Runner
How to use prateekfr/qwen3-1.7b-no-e with Docker Model Runner:
docker model run hf.co/prateekfr/qwen3-1.7b-no-e:F16
- Lemonade
How to use prateekfr/qwen3-1.7b-no-e with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull prateekfr/qwen3-1.7b-no-e:F16
Run and chat with the model
lemonade run user.qwen3-1.7b-no-e-F16
List all available models
lemonade list
- Hermes Agent
How to use prateekfr/qwen3-1.7b-no-e with Hermes Agent:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf prateekfr/qwen3-1.7b-no-e:F16
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:9931/v1 hermes config set model.default prateekfr/qwen3-1.7b-no-e:F16
Run Hermes
hermes
- Atomic Chat
- OpenClaw
How to use prateekfr/qwen3-1.7b-no-e with OpenClaw:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf prateekfr/qwen3-1.7b-no-e:F16
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:9931/v1 \ --custom-model-id "prateekfr/qwen3-1.7b-no-e:F16" \ --custom-provider-id llama-cpp \ --custom-compatibility openai \ --custom-text-input \ --accept-risk \ --skip-health
Run OpenClaw
openclaw agent --local --agent main --message "Hello from Hugging Face"
Qwen3-1.7B Lipogram Model โ Standalone Merged FP16 (Minus the 'E')
This repository contains the standalone, fully merged Qwen3-1.7B model weights (FP16), post-trained to adhere to a strict character-level constraint: generating fluent, grammatical English without ever using the letter "e" or "E" (a lipogram).
Trained and aligned using a 3-layer architecture:
- Logit Masking: Pre-computed boolean mask blocking 103,639 tokens (68.33% of the Qwen3 vocabulary).
- Supervised Fine-Tuning (SFT): 4-bit QLoRA trained on 180 curated, human-verified e-free instruction pairs.
- Reinforcement Learning (GRPO): Group Relative Policy Optimization optimizing response fluency, length consistency, and lexical diversity.
Benchmark Results (Gadsby Benchmark Suite)
| Model Architecture Stage | Strict Lipogram Pass | Usable Response Rate | N-Gram Diversity |
|---|---|---|---|
| Base Qwen-1.7B + Mask | 88.0% | 28.0%* | 91.5% |
| SFT (180 Rewrites) + Mask | 96.0% | 80.0% | 91.5% |
| RL (GRPO Best) + Mask | 100.0% | 88.0% | 92.5% |
*Note: Base model usable rate reflects pure English ASCII responses; unaligned base models attempt foreign-language token substitutions to evade the constraint.
Usage
1. Requirements
pip install torch transformers
2. Standalone Inference with Logit Mask
import torch
from transformers import AutoModelForCausalLM, AutoTokenizer
# 1. Load standalone merged model and tokenizer
model_id = "prateekfr/qwen3-1.7b-no-e"
tokenizer = AutoTokenizer.from_pretrained(model_id)
model = AutoModelForCausalLM.from_pretrained(
model_id,
torch_dtype=torch.float16,
device_map="auto"
)
model.eval()
# 2. Build forbidden token mask (blocking 'e' and 'E')
vocab_size = model.config.vocab_size
forbidden_mask = torch.zeros(vocab_size, dtype=torch.bool)
for token_id in range(vocab_size):
token_str = tokenizer.decode([token_id])
if "e" in token_str.lower():
forbidden_mask[token_id] = True
# 3. Generate with mask applied to logits
prompt = "Write a short poem about a frog."
inputs = tokenizer(f"<|im_start|>user\n{prompt}<|im_end|>\n<|im_start|>assistant\n", return_tensors="pt").to("cuda")
with torch.no_grad():
curr_ids = inputs["input_ids"]
for _ in range(60):
outputs = model(input_ids=curr_ids)
scores = outputs.logits[:, -1, :].clone().float()
scores[:, forbidden_mask.to("cuda")] = -float("inf")
next_token = torch.multinomial((scores / 0.7).softmax(-1), num_samples=1)
if next_token.item() == tokenizer.eos_token_id:
break
curr_ids = torch.cat([curr_ids, next_token], dim=-1)
print(tokenizer.decode(curr_ids[0][inputs["input_ids"].shape[1]:], skip_special_tokens=True).strip())
GGUF & Ollama Deployment
A pre-converted GGUF FP16 binary (qwen3-1.7b-no-e-f16.gguf) is available in this repository for local CPU/GPU inference via llama.cpp or Ollama.
Run in Ollama:
# 1. Download the GGUF binary
huggingface-cli download prateekfr/qwen3-1.7b-no-e qwen3-1.7b-no-e-f16.gguf --local-dir .
# 2. Create Ollama model from Modelfile
ollama create qwen3-no-e -f Modelfile
ollama run qwen3-no-e
Citation & Attribution
- Author & Post-Training Engineer: Prateek
- Base Architecture: Qwen3-1.7B by the Qwen Team / Alibaba Cloud
- License: Apache 2.0
- Downloads last month
- 75