Downloads · 30 days
0
jimtyler/pseng-14b-preview
pseng-14b-preview is a machine learning model from jimtyler. Use it for the machine learning task on the model card, and read the license before you ship it in a product. It is set up for mlx. The card lists the license as mit.
A LoRA adapter that teaches Phi-4 to write PowerShell conforming to the PowerShell Engineer Standard without the Standard in the context window. Trained locally on Apple Silicon with MLX. No hosted API touched the dat…
Downloads · 30 days
0
Access
Public
Updated Aug 6, 2026
Repo size
223 MB
Likes
0
Public
Click a slice to open those files.
.safetensors223 MB · 100%
From the Hugging Face model README
A LoRA adapter that teaches Phi-4 to write PowerShell conforming to the PowerShell Engineer Standard without the Standard in the context window. Trained locally on Apple Silicon with MLX. No hosted API touched the data at any stage.
This is a preview from an in-progress run, not a finished model. Read the limitations before quoting anything from it.
⚠️ This is an MLX adapter, not a PEFT adapter.
PeftModel.from_pretrained()will not load it. Theadapter_config.jsonhere uses MLX's schema (lora_parameters,num_layers,keys), not PEFT's (peft_type,r,target_modules). Usemlx-lm, as shown below. Apple Silicon required.
pip install mlx-lm
The adapter was trained against a 4-bit quantized Phi-4. Build that exact base first , it is a local conversion, not a Hub repo:
python -m mlx_lm convert \
--hf-path mlx-community/phi-4-bf16 \
-q --q-bits 4 --q-group-size 64 \
--mlx-path phi-4-4bit
Then generate:
python -m mlx_lm generate \
--model phi-4-4bit \
--adapter-path <path to this adapter> \
--max-tokens 1600 --temp 0.0 \
--prompt "Write a function that disables Active Directory accounts inactive for more than a given number of days."
Standard-conforming functions are long: comment-based help with three examples,
validated parameters, ShouldProcess where state changes. Give it 1,600 tokens. Greedy
decoding (--temp 0.0) is what it was evaluated under.
Applying the adapter to a differently-quantized base may not reproduce the results below.
Measured on a 48-task development split. This is not the project's frozen benchmark, which is reserved for a pre-registered evaluation this model has not yet undergone.
| Condition (same 48 dev tasks) | First attempt | After one repair |
|---|---|---|
| Phi-4 base, plain prompt | 16.9 | 31.2 |
| Phi-4 base, full Standard in system prompt | 18.2 | 41.2 |
| PSEng-14B-preview | 59.3 | 73.8 |
Scores are 0–100 under a static rubric: PowerShell's own parser, an AST walk for Standard structure, PSScriptAnalyzer under pinned settings, and a validator that rejects invented cmdlets and parameters. Any parse failure or invented surface scores the task zero.
Putting the entire Standard in Phi-4's context bought about one point. Training on it bought forty-two. That gap is a caution about prompt-based delivery generally, not a claim that this model is good.
These numbers are not comparable to the PSEng-8B flagship's published benchmark scores. Different task set, different base model. A like-for-like number will exist only after the pre-registered evaluation.
Get-Help before running it.mlx-community/phi-4-bf16 revision e9ebdf8d, converted
locally to 4-bit (group size 64, affine).self_attn.qkv_proj
and mlp.gate_up_proj plus self_attn.o_proj and mlp.down_proj. lr 1e-5, batch 1,
sequence 3,072, completion-only loss, seed 20260805.MIT, inherited from Phi-4 (Copyright (c) Microsoft Corporation). Its notice travels with
this adapter in NOTICE.
What is in this download: weight deltas trained on top of Phi-4, and nothing else. No third-party model weights are included, and no model other than Phi-4 is needed to run it.
The training corpus was generated during dataset construction by Qwen3-Coder-30B-A3B-Instruct
(Apache 2.0), running locally. That model is not in the inference path and none of its weights
are distributed here. Task material derived from MicrosoftDocs repositories is CC BY 4.0.
Full attribution for all three is in NOTICE.
PowerShell is a trademark of Microsoft Corporation. This project is not affiliated with, endorsed by, or sponsored by Microsoft.