license: apache-2.0
base_model: xtools-at/DeepSeek-V4-Pro-Qwen3.5-9B-UNCENSORED-heretic
pipeline_tag: text-generation
tags:
- qwen3.5
- q4nx
- fastflowlm
- amd-ryzen-ai
- npu
- quantized
DeepSeek-V4-Pro-Qwen3.5-9B-UNCENSORED-heretic — Q4NX weights
Unofficial, modified Q4NX model weights for FastFlowLM on AMD XDNA 2 NPUs. This is a Qwen3.5-9B derivative distilled using DeepSeek-V4-Pro as a teacher; it is not the DeepSeek-V4-Pro model itself. This repository contains model weights and the associated license, attribution, and integrity information; it does not contain an FLM runtime, NPU kernels, model registration, tokenizer, or configuration files.
Weights
| File | Description | SHA-256 |
|---|---|---|
model.q4nx |
Language weights, 7,132,498,128 bytes | 20c6bd9e8098e0daa3a8f51a6a617853f4ef4ca5e09b7550bdcc2b3d2ad80dcb |
vision_weight.q4nx |
Vision weights, 1,027,737,360 bytes; image inference not tested | 2eafb7317c0dc71bf5d8f98846c7091d5cd5ba11622e50048886ba9956323209 |
Sources and conversion
The model lineage is Qwen3.5-9B, Jackrong/DeepSeek-V4-Pro-Qwen3.5-9B, and xtools-at's Heretic derivative.
The language input was the Q4_K_S GGUF from mradermacher's GGUF repository, SHA-256 70b98f788618673e7fced4e3b4fbd0e0af8aa33167b450f4a9fcae4db90bd85e. Conversion used a locally modified AMD FLM_Q4NX_Converter, base commit 93b83988519377935a648ec80740068920ba4076. Eight Q5_K matrices were requantized to Q4_K using llama.cpp's reference quantizer; alpha/beta data were converted from Q4_K to Q8_0 and 48 BF16 prefill tensors were generated. The conversion is lossy and does not recover precision already lost in the GGUF input. The local converter modifications are not included.
The vision input was DeepSeek-V4-Pro-Qwen3.5-9B-UNCENSORED-heretic.mmproj-f16.gguf from the same GGUF repository, SHA-256 1a2244e013aa758c5c3cf6b384400165aad63eac437ebb4314d21bced8f16862, converted separately. Although included because the tested FLM configuration required it for startup, image input has not been tested.
Usage and verification
These files alone are not a complete runnable installation. The following Windows instructions download the required configuration and tokenizer separately and create a new isolated FLM registry. The tested runtime was FastFlowLM 1.0.12 on Windows 11 with an AMD Ryzen AI 7 350 XDNA 2 NPU. Other versions and platforms are not verified. Install FastFlowLM and the AMD NPU driver separately first; the installed FLM directory must contain its model_list.json and xclbins\Qwen3.5-9B-NPU2 kernels.
Download model.q4nx and vision_weight.q4nx from this repository into the same folder and open Windows PowerShell in that folder. Ensure there is at least 9 GB of free disk space for the separate model copy. Run the following in the same PowerShell window. If FLM is installed elsewhere, change $flmRoot. If the output folder already exists, choose a new path for $isolated; the commands refuse to replace it.
$ErrorActionPreference = 'Stop'
$weights = (Get-Location).Path
$flmRoot = 'C:\Program Files\flm'
$isolated = Join-Path $env:USERPROFILE 'heretic-q4nx-isolated'
$modelName = 'Heretic-Qwen3.5-9B-NPU2'
$modelDir = Join-Path $isolated "models\$modelName"
$kernel = Join-Path $flmRoot 'xclbins\Qwen3.5-9B-NPU2'
$catalog = Join-Path $flmRoot 'model_list.json'
if (Test-Path -LiteralPath $isolated) { throw 'Output already exists; choose a new $isolated path.' }
foreach ($p in @((Join-Path $weights 'model.q4nx'), (Join-Path $weights 'vision_weight.q4nx'), $kernel, $catalog, (Join-Path $flmRoot 'flm.exe'))) {
if (-not (Test-Path -LiteralPath $p)) { throw "Required file or directory is missing: $p" }
}
New-Item -ItemType Directory -Path $modelDir -Force | Out-Null
Copy-Item -LiteralPath (Join-Path $weights 'model.q4nx') -Destination $modelDir
Copy-Item -LiteralPath (Join-Path $weights 'vision_weight.q4nx') -Destination $modelDir
$configUrl = 'https://huggingface.co/FastFlowLM/Qwen3.5-9B-NPU2/resolve/3889d60d3630c521da18bd0a0141bc119a3a4c19/config.json'
Invoke-WebRequest -UseBasicParsing -Uri $configUrl -OutFile (Join-Path $modelDir 'config.json')
$tokUrl = 'https://huggingface.co/xtools-at/DeepSeek-V4-Pro-Qwen3.5-9B-UNCENSORED-heretic/resolve/e4bfa83c72896cbb4990c909967d6f27bb97bac4'
foreach ($name in @('tokenizer.json', 'tokenizer_config.json', 'chat_template.jinja')) {
Invoke-WebRequest -UseBasicParsing -Uri "$tokUrl/$name" -OutFile (Join-Path $modelDir $name)
}
$utf8 = [Text.UTF8Encoding]::new($false)
$tokenConfigPath = Join-Path $modelDir 'tokenizer_config.json'
$tokenConfig = Get-Content -LiteralPath $tokenConfigPath -Raw -Encoding UTF8 | ConvertFrom-Json
$tokenConfig | Add-Member -NotePropertyName eos_token_id -NotePropertyValue @(248044,248046,248048) -Force
[IO.File]::WriteAllText($tokenConfigPath, ($tokenConfig | ConvertTo-Json -Depth 100), $utf8)
New-Item -ItemType Directory -Path (Join-Path $isolated 'xclbins') -Force | Out-Null
Copy-Item -LiteralPath $kernel -Destination (Join-Path $isolated "xclbins\$modelName") -Recurse
$official = Get-Content -LiteralPath $catalog -Raw -Encoding UTF8 | ConvertFrom-Json
$entry = $official.models.'qwen3.5'.'9b'
if (-not $entry) { throw 'The FLM catalog does not contain qwen3.5:9b.' }
$entry.name = $modelName
$entry.files = @('config.json','model.q4nx','tokenizer.json','tokenizer_config.json','chat_template.jinja','vision_weight.q4nx')
$entry.url = ''; $entry.file_url = ''; $entry.ms_url = ''
$registry = @{ model_path = 'models'; models = @{ heretic = @{ '9b' = $entry } } }
[IO.File]::WriteAllText((Join-Path $isolated 'model_list.json'), ($registry | ConvertTo-Json -Depth 100), $utf8)
$env:FLM_CONFIG_PATH = Join-Path $isolated 'model_list.json'
$env:FLM_MODEL_PATH = $isolated
$env:FLM_XCLBIN_PATH = $isolated
& (Join-Path $flmRoot 'flm.exe') list
& (Join-Path $flmRoot 'flm.exe') run 'heretic:9b' --ctx-len 8192
The three FLM_* variables apply to the current PowerShell window. In a new window, set them again to the same paths before running FLM. This setup does not edit the existing FLM catalog or overwrite another model. If setup is interrupted, choose a new output directory before retrying. The configuration is copied from the pinned FLM Qwen3.5-9B reference; the tokenizer and chat template are from the pinned Heretic source, with the FLM stop IDs added locally to tokenizer_config.json. Setup through registry creation was tested against the original successful configuration. A subsequent flm list attempt was blocked by Windows application control, so inference using this newly created directory remains unverified. Windows may also block unsigned FLM executables or DLLs; see Microsoft's Smart App Control FAQ.
The language file passed header and data-range checks for 475 tensors and 32 layers; its tensor names, types and shapes matched the tested FLM Qwen3.5-9B reference. FLM logged NPU lock and release during Japanese text, simple programming, multi-turn and long-input smoke tests. Numerical equivalence to BF16, image inference, extended stability and independent NPU utilization percentages were not established.
One repetitive 46,433-token input in a 65,536-token context correctly returned its initial passphrase in about 296 seconds, close to the test machine's memory safety threshold. This does not establish full 65,536-token capacity or general long-context accuracy. Results depend on hardware and available memory.
The Heretic derivative may behave differently from the upstream models. Outputs can be incorrect or harmful and should be evaluated for the intended use.
License and attribution
The model lineage and GGUF source are listed as Apache-2.0. See LICENSE and NOTICE for the license and source attribution. No FLM runtime or NPU kernel binaries are redistributed here; they have separate terms.