Instructions to use openenv/Qwen3-1.7B-Wordle-SFT-GRPO with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use openenv/Qwen3-1.7B-Wordle-SFT-GRPO with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="openenv/Qwen3-1.7B-Wordle-SFT-GRPO") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("openenv/Qwen3-1.7B-Wordle-SFT-GRPO") model = AutoModelForCausalLM.from_pretrained("openenv/Qwen3-1.7B-Wordle-SFT-GRPO", device_map="auto") messages = [ {"role": "user", "content": "Who are you?"}, ] inputs = tokenizer.apply_chat_template( messages, add_generation_prompt=True, tokenize=True, return_dict=True, return_tensors="pt", ).to(model.device) outputs = model.generate(**inputs, max_new_tokens=256) print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use openenv/Qwen3-1.7B-Wordle-SFT-GRPO with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "openenv/Qwen3-1.7B-Wordle-SFT-GRPO" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "openenv/Qwen3-1.7B-Wordle-SFT-GRPO", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/openenv/Qwen3-1.7B-Wordle-SFT-GRPO
- SGLang
How to use openenv/Qwen3-1.7B-Wordle-SFT-GRPO 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 "openenv/Qwen3-1.7B-Wordle-SFT-GRPO" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "openenv/Qwen3-1.7B-Wordle-SFT-GRPO", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'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 "openenv/Qwen3-1.7B-Wordle-SFT-GRPO" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "openenv/Qwen3-1.7B-Wordle-SFT-GRPO", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use openenv/Qwen3-1.7B-Wordle-SFT-GRPO with Docker Model Runner:
docker model run hf.co/openenv/Qwen3-1.7B-Wordle-SFT-GRPO
Qwen3-1.7B-Wordle-SFT-GRPO
Qwen3-1.7B trained to play Wordle on the OpenEnv Wordle environment: a short SFT warmup (openenv/Qwen3-1.7B-Wordle-SFT), then GRPO with TRL. It plays through a guess tool and writes a short reasoning before each guess. The OpenEnv Wordle tutorial walks through the whole pipeline.
| Model | Wins on 30 words (greedy) | Guesses per win | Invalid guesses |
|---|---|---|---|
| Qwen3-1.7B | 0/30 | - | 24 |
| Qwen3-1.7B-Wordle-SFT | 10/30 | 3.2 | 41 |
| This model | 20/30 | 4.1 | 3 |
The 30 words (secrets30.txt) come from the 156 nouns TextArena draws its secrets from, the same list used in training, and each model was trained once. Treat the numbers as one run on this environment's words.
Watch the three play the same words in the Wordle Arena.
Training
GRPO with environment_factory, starting from the SFT model: 150 steps of 4 prompts x 16 games, thinking on, constant learning rate 1e-6, max_completion_length=4096, vllm_importance_sampling_mode="token_truncate", vLLM colocated. The reward has three terms: a win that pays more the faster it comes (1 + 0.5 * (1 - guesses / 6)), partial credit from the best guess of a lost game (0.1 * greens), and -0.1 per invalid move. One A100 80GB through Hugging Face Jobs, about 2 hours 15 minutes ($5.60). Script: grpo.py. Training curves: Trackio. The completions/ folder holds every logged game.
Use it
Play it against the environment with evaluate.py:
uv run evaluate.py --model openenv/Qwen3-1.7B-Wordle-SFT-GRPO --thinking --max-new-tokens 512 --games 5 --env-url https://openenv-wordle.hf.space --out games.jsonl
Framework versions
- TRL: 1.16.0
- OpenEnv: 0.10.0
- Transformers: 5.20.2
- vLLM: 0.31.0
- Downloads last month
- 1,091