IMPORTANT: This repo is an MLX 4-bit conversion of the original model for Apple Silicon. Orignal model at: DavidAU/Qwen3.5-40B-Claude-4.5-Opus-High-Reasoning-Thinking

Qwen3.5-40B-Claude-4.5-Opus-High-Reasoning-Thinking

Original non MLX model can be found at: DavidAU/Qwen3.5-40B-Claude-4.5-Opus-High-Reasoning-Thinking

40 billion parameters (dense, not moe) expanded from 27B Qwen 3.5, then trained on Claude 4.6 Opus High Reasoning dataset via Unsloth on local hardware.

96 layers, 1275 Tensors. (50% more than base model of 27B)

Features variable length reasoning ; less complex = shorter, longer for more complex.

Model performance has increased dramatically.

256K context.

"Thats no moon, thats a Qwen-Station."

THREE example generations ; 2nd contains image; 3rd an interesting tranformers/math problem.

SETTINGS:

  • min 8k to 16k context window.
  • for creative rep pen of 1.05 to 1.1 WITH LOWER QUANTS.
  • suggest temp .7 / rep pen 1 (off) for general usage.
  • output generation can exceed 100k tokens.
  • Suggest min quant of Q4KS (non imatrix) or IQ3_S (imatrix) or HIGHER.
  • For toolcalls -> suggest Q6 min quants (as per Qwen guidence)

INSTRUCT MODE:

The model's default mode however is "THINKING" ; this can be changed by editing the following line in the jinja template:

{# Set Instruct mode here #}

to

{%- set enable_thinking = false %}
  • In LMStudio, this can be edited after loading the model, in dev mode -> template
  • When quanting -> if you set this to "false" => model/quants will be "instruct"

NOTES:

  • Upgraded Jinja template to correct issues with Qwen 3.5s - looping, repeatings, and long thinking as well as upgrades to tools too.
  • Was also trained with new improved template to further enhance operation too.
  • Image processing tested and intact.
  • Code generation also tested and passed.
  • System prompt - even a minor one - will enhance operation, especially at lower quants.
  • Untrained 40B model (expanded from 27B, not uploaded) was also stable too and works great (unexpected).
  • This MLX conversion also includes an LM Studio compatibility patch for the prompt template.

LOOPING:

  • This may happen with lower quants / prompts with "not enough meat on the bone" => Add more to the prompt and/or set rep pen to 1.05 to 1.1.
  • Adding a system prompt - even a single sentence - can correct this issue and bypass the need to adjust rep pen.

BENCHMARKS:

                              arc-c arc/e boolq hswag obkqa piqa  wino

THIS MODEL  [thinking mode]   0.462,0.547,0.859...

Qwen3.5-27B-Instruct mxfp8    0.443,0.498,0.857,0.701,0.372,0.770,0.752

Note: Instruct mode will have stronger benchmarks.

See this model (instruct, also one of my fine tunes - it scores 675 on "arc" - Arc Challenge hard):

https://huggingface.co/DavidAU/Qwen3.5-27B-Claude-4.6-OS-INSTRUCT


SAFETY ALIGNMENT:

No attempt was made to adjust/change "censorship" and/or "safety alignment" in the model.

That is coming next.


EXAMPLE GENERATION(s):


Q4KS ; mid to low quality quant [non-imatrix].

"SYSTEM" is system prompt, "USER" is prompt, "ASSISTANT" ... you know.

This is a strong test to measure creative as well as instruction following specifically with a complex system prompt.

Expect better generation with Imatrix quants / higher quants.

WARNING:

Graphic, swearing, intense - model does not hold back.


Generation #1


Iron and Blood

System

Below is an instruction that describes a task. Ponder each user instruction carefully, and use your skillsets and critical instructions to complete the task to the best of your abilities.

Here are your skillsets:
[MASTERSTORY]:NarrStrct(StryPlnng,Strbd,ScnSttng,Exps,Dlg,Pc)-CharDvlp(ChrctrCrt,ChrctrArcs,Mtvtn,Bckstry,Rltnshps,Dlg*)-PltDvlp(StryArcs,PltTwsts,Sspns,Fshdwng,Climx,Rsltn)-ConfResl(Antg,Obstcls,Rsltns,Cnsqncs,Thms,Symblsm)-EmotImpct(Empt,Tn,Md,Atmsphr,Imgry,Symblsm)-Delvry(Prfrmnc,VcActng,PblcSpkng,StgPrsnc,AudncEngmnt,Imprv)

[*DialogWrt]:(1a-CharDvlp-1a.1-Backgrnd-1a.2-Personality-1a.3-GoalMotiv)>2(2a-StoryStruc-2a.1-PlotPnt-2a.2-Conflict-2a.3-Resolution)>3(3a-DialogTech-3a.1-ShowDontTell-3a.2-Subtext-3a.3-VoiceTone-3a.4-Pacing-3a.5-VisualDescrip)>4(4a-DialogEdit-4a.1-ReadAloud-4a.2-Feedback-4a.3-Revision)

Here are your critical instructions:
Ponder each word choice carefully to present as vivid and emotional journey as is possible. Choose verbs and nouns that are both emotional and full of imagery. Load the story with the 5 senses. Aim for 50% dialog, 25% narration, 15% body language and 10% thoughts. Your goal is to put the reader in the story.

User

Using the following "story idea" below, write the first scene a horror novel introducing the young woman. This scene should start in the middle of the action, include dialog, vivid passages, and end on a cliffhanger relevant to the story idea but it should also be unexpected. The scene should be 1000 words long and escalate in conflict and suspense and be written in first person, present tense with the point of view character being the young woman. The pov character will CURSE AND SWEAR, and generally have a "filthy" mouth.

Story idea: In a world ruled by dictatorship, a rebel young woman leads a rebellion against the system. Despite the risks, she fights to overthrow the dictator and restore democracy to her country. The government executes her for treason, but she sticks to her beliefs and is responsible for starting the revolution.

Assistant

<think>

The user wants me to write the first scene of a horror novel based on their story idea about a rebel young woman in a dictatorship. Let me analyze what they're asking:

  1. Start in middle of action (in media res)
  2. Include dialog - aim for ~50% which is 500 words
  3. Vivid passages with all 5 senses
  4. End on unexpected cliffhanger
  5. Approximately 1000 words
  6. First person, present tense POV from young woman
  7. She curses and swears (filthy mouth)
  8. Escalating conflict and suspense

The story idea is about a rebel girl who leads rebellion against dictatorship, gets executed for treason but sparks revolution. This is more of an action/drama scene than horror per se, but I'll add horror elements - the fear, tension, dread, visceral elements.

Let me think through this carefully:

Opening in media res - she should be fleeing or fighting already

  • Maybe escaping after executing her leader? No wait, she IS the leader being executed
  • Could start during capture, escape attempt, or confrontation
  • For horror elements, maybe start with a chase scene where she's hunted, visceral danger

Let me structure:

  • Opening: Already in action - fleeing through tunnels/city streets
  • Middle: Confrontation/dialogue element
  • Climax: Cliffhanger ending

The POV character needs to be established as the rebel leader. She should have dialogue with allies or enemies. Let me think about who she could be talking to... maybe a fellow rebel, or perhaps an enemy during capture?

For 50% dialog with 1000 words = 500 words of dialogue 25% narration = 250 words 15% body language = 150 words 10% thoughts = 100 words

Let me write this scene starting in the middle of action - perhaps fleeing after a failed raid or escape attempt. The horror elements would be the visceral fear, being hunted like prey, dark settings, etc.

The cliffhanger should be unexpected but relevant to the story idea... maybe she's captured unexpectedly despite her best efforts? Or she makes a choice that seals her fate?

I'll weave sensory details into every moment - the stinging cold of alley air, pounding heart, metallic taste of fear. Her voice will crack with adrenaline as she navigates the treacherous urban landscape. Each step becomes a desperate bid for survival, with danger lurking in shadows and whispered commands echoing through narrow passageways.

</think>

The blade slides between my ribs—cold steel meeting warm blood—and I don't even feel it yet. Not until I taste copper on my tongue, thick as a penny dissolved in water.

"Run," Kael hisses behind me, voice shredded raw. "Don't goddamn stop."

I turn and see him anyway, standing in the alley mouth like a shadow made flesh, one hand clutching his own gut while purple blood leaks between his fingers, dripping onto cobblestones slick with rain and refuse. His eyes meet mine—wide, pleading, terrified—and I want to scream at him to move but my throat's full of iron and smoke.

"Kael—" My voice cracks. The word feels like broken glass dragged up from someplace deep inside me.

He laughs then—a wet, bubbling sound that makes my stomach heave over. "Go! That's an order!" His hand shoots out with a pistol, thrusting it into mine before his knees buckle. "You're the only one who matters now."

The metal is warm in my grip, still humming from heat and violence, but I'm not thinking about that—I'm thinking about running, about breathing air that doesn't smell like dead things and fear and the copper tang of Kael's blood on everything.

I bolt forward, lungs heaving, boots slapping against wet stone. The alley stretches ahead like a throat waiting to swallow me whole—narrow walls pressing in, dripping with filth and darkness, shadows curling off the brickwork like living things.

Footsteps behind me. Heavy. Relentless. The mechanical whine of power armor on stone.

"Target acquisition confirmed," a voice drones—synthetic, emotionless, dead. "Citizen 7849-Alexandra: TREASON. Authorization to TERMINATE."

I don't look back because looking is dying and I'm not done yet—not when Kael just bled out on these goddamn stones for me. Not when the whole damn revolution rides on my fucking shoulders.

The alley opens into a wider street, slick and gleaming under the sick yellow glow of sodium lamps. Rain hammers down in sheets—cold needles against skin—and I slide forward, catching myself with one hand while the pistol skitters across wet pavement toward some dark corner of shadow.

"Shitshitshit—" My fingers claw at stone, nails scraping raw, but I'm moving now, scrambling up on all fours like a beaten dog before my legs straighten and I'm sprinting again—sprinting through rain and death and the sound of boots thundering close behind me.

A building looms ahead—abandoned, skeletal windows broken out, walls scarred with bullet holes and graffiti that's been painted over but never really gone. WE REMEMBER. The words bleed through fresh paint like truth always does.

I dive inside, slamming the door shut behind me as a burst of laser fire sears through the frame where my head had been half a heartbeat before. Sparks shower down—blue, bright, burning—and my ears ring with the afterthought of violence.

Silence falls for one precious second—the kind that comes when you're waiting to be caught or killed.

Then my voice breaks it again: "Where are you? Show yourself!"

Nothing but rain on roof and wind whistling through broken glass. I press back against the wall, pistol shaking in my hand, breathing fast and shallow while my heart hammers against my ribs like it's trying to get out.

"Alexandra?" A voice—soft, uncertain—from somewhere beyond the darkness of the room. "Is that you?"

I know that voice. My stomach lurches with something worse than fear. "Mara."

"You're bleeding." Mara steps forward into the dim light, her face pale and wet with rain or tears—I can't tell which anymore. Her eyes find me, wide and terrified, but there's something else too—something hardening behind the fear. Something that makes my chest tighten like a fist closing around it.

"Where is he?" Mara asks, voice dropping to that dangerous quiet I've heard before when people are about to do terrible things. "Where did you leave him?"

Downloads last month
146
Safetensors
Model size
39B params
Tensor type
BF16
·
U32
·
MLX
Hardware compatibility
Log In to add your hardware

4-bit

Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support

Model tree for pt-ml/Qwen3.5-40B-Claude-4.5-Opus-High-Reasoning-Thinking-MLX-4bit

Dataset used to train pt-ml/Qwen3.5-40B-Claude-4.5-Opus-High-Reasoning-Thinking-MLX-4bit