commit 18cd40c04b9bc5524075fea98953ff0020c59eed Author: ModelHub XC Date: Sun Apr 12 16:03:00 2026 +0800 初始化项目,由ModelHub XC社区提供模型 Model: reaperdoesntknow/Qwen3-1.7B-Coder-Distilled-SFT-GGUF Source: Original Platform diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..524178f --- /dev/null +++ b/.gitattributes @@ -0,0 +1,39 @@ +*.7z filter=lfs diff=lfs merge=lfs -text +*.arrow filter=lfs diff=lfs merge=lfs -text +*.bin filter=lfs diff=lfs merge=lfs -text +*.bz2 filter=lfs diff=lfs merge=lfs -text +*.ckpt filter=lfs diff=lfs merge=lfs -text +*.ftz filter=lfs diff=lfs merge=lfs -text +*.gz filter=lfs diff=lfs merge=lfs -text +*.h5 filter=lfs diff=lfs merge=lfs -text +*.joblib filter=lfs diff=lfs merge=lfs -text +*.lfs.* filter=lfs diff=lfs merge=lfs -text +*.mlmodel filter=lfs diff=lfs merge=lfs -text +*.model filter=lfs diff=lfs merge=lfs -text +*.msgpack filter=lfs diff=lfs merge=lfs -text +*.npy filter=lfs diff=lfs merge=lfs -text +*.npz filter=lfs diff=lfs merge=lfs -text +*.onnx filter=lfs diff=lfs merge=lfs -text +*.ot filter=lfs diff=lfs merge=lfs -text +*.parquet filter=lfs diff=lfs merge=lfs -text +*.pb filter=lfs diff=lfs merge=lfs -text +*.pickle filter=lfs diff=lfs merge=lfs -text +*.pkl filter=lfs diff=lfs merge=lfs -text +*.pt filter=lfs diff=lfs merge=lfs -text +*.pth filter=lfs diff=lfs merge=lfs -text +*.rar filter=lfs diff=lfs merge=lfs -text +*.safetensors filter=lfs diff=lfs merge=lfs -text +saved_model/**/* filter=lfs diff=lfs merge=lfs -text +*.tar.* filter=lfs diff=lfs merge=lfs -text +*.tar filter=lfs diff=lfs merge=lfs -text +*.tflite filter=lfs diff=lfs merge=lfs -text +*.tgz filter=lfs diff=lfs merge=lfs -text +*.wasm filter=lfs diff=lfs merge=lfs -text +*.xz filter=lfs diff=lfs merge=lfs -text +*.zip filter=lfs diff=lfs merge=lfs -text +*.zst filter=lfs diff=lfs merge=lfs -text +*tfevents* filter=lfs diff=lfs merge=lfs -text +qwen3-1.7b-coder-distilled-sft-f16.gguf filter=lfs diff=lfs merge=lfs -text +qwen3-1.7b-coder-distilled-sft-Q4_K_M.gguf filter=lfs diff=lfs merge=lfs -text +qwen3-1.7b-coder-distilled-sft-Q5_K_M.gguf filter=lfs diff=lfs merge=lfs -text +qwen3-1.7b-coder-distilled-sft-Q8_0.gguf filter=lfs diff=lfs merge=lfs -text diff --git a/README.md b/README.md new file mode 100644 index 0000000..8106863 --- /dev/null +++ b/README.md @@ -0,0 +1,221 @@ +--- +library_name: llama.cpp +license: apache-2.0 +language: + - en +base_model: reaperdoesntknow/Qwen3-1.7B-Coder-Distilled-SFT +tags: + - gguf + - quantized + - distillation + - sft + - reasoning + - mathematics + - physics + - logic + - logical-inference + - stem + - code + - chain-of-thought + - convergentintel + - edge + - knowledge-distillation +pipeline_tag: text-generation +--- + +# Qwen3-1.7B-Coder-Distilled-SFT — GGUF + +GGUF quantizations of [reaperdoesntknow/Qwen3-1.7B-Coder-Distilled-SFT](https://huggingface.co/reaperdoesntknow/Qwen3-1.7B-Coder-Distilled-SFT) for local and edge deployment via [llama.cpp](https://github.com/ggerganov/llama.cpp) and compatible runtimes. + +Coder teacher → STEM distillation → logical inference SFT → quantized. Structured reasoning in ~1.2GB. + +## Available Quantizations + +| File | Quant | Size | Use Case | +|---|---|---|---| +| `qwen3-1.7b-coder-distilled-sft-f16.gguf` | F16 | ~3.8 GB | Full precision reference | +| `qwen3-1.7b-coder-distilled-sft-Q8_0.gguf` | Q8_0 | ~2.1 GB | Near-lossless, desktop | +| `qwen3-1.7b-coder-distilled-sft-Q5_K_M.gguf` | Q5_K_M | ~1.4 GB | Balanced quality and size | +| `qwen3-1.7b-coder-distilled-sft-Q4_K_M.gguf` | Q4_K_M | ~1.2 GB | Mobile, edge, fastest inference | + +**Recommended:** Q5_K_M for desktop, Q4_K_M for mobile/edge. + +## About the Model + +Two-stage build: + +**Stage 1 — Coder Teacher Distillation:** Qwen3-1.7B distilled from [Qwen3-Coder-30B-A3B-Instruct](https://huggingface.co/Qwen/Qwen3-Coder-30B-A3B-Instruct) on 6,122 STEM CoT samples. Proof-weighted cross-entropy (2.5x → 1.5x on derivation tokens) + KL divergence at T=2.0. The Coder teacher transfers structured decomposition patterns — sequential logic, state tracking, compositional reasoning — through the softmax landscape. + +**Stage 2 — Logical Inference SFT:** Fine-tuned on [KonstantinDob/logic_inference_dataset](https://huggingface.co/datasets/KonstantinDob/logic_inference_dataset) (~54,607 propositional logic pairs, LOGICINFERENCEe format). The model performs inference first, then concludes. Based on the [LogicInference paper](https://openreview.net/pdf?id=HAGeIS_Lcg9) by Santiago Ontañón (Google Research). + +| Attribute | Value | +|---|---| +| **Base model** | [Qwen/Qwen3-1.7B](https://huggingface.co/Qwen/Qwen3-1.7B) | +| **Teacher model** | [Qwen/Qwen3-Coder-30B-A3B-Instruct](https://huggingface.co/Qwen/Qwen3-Coder-30B-A3B-Instruct) | +| **Stage 1 data** | 6,122 STEM CoT samples | +| **Stage 2 data** | ~54,607 logical inference pairs | +| **Developer** | Reaperdoesntrun / [Convergent Intelligence LLC](https://convergentintel.com): Research Division | + +## Usage + +### llama.cpp CLI + +```bash +./llama-cli -m qwen3-1.7b-coder-distilled-sft-Q4_K_M.gguf \ + -p "### Instruction:\nConsider the premises: If it rains, the ground is wet. It is raining. What can we conclude?\n\n### Response:\n" \ + -n 512 --temp 0.0 +``` + +### llama.cpp Python + +```python +from llama_cpp import Llama + +llm = Llama(model_path="qwen3-1.7b-coder-distilled-sft-Q4_K_M.gguf", n_ctx=1024) + +output = llm( + "### Instruction:\nIs the following argument valid? All dogs are animals. Some animals are pets. Therefore, all dogs are pets.\n\n### Response:\n", + max_tokens=512, + temperature=0.0, +) +print(output["choices"][0]["text"]) +``` + +### Ollama + +```bash +echo 'FROM ./qwen3-1.7b-coder-distilled-sft-Q4_K_M.gguf' > Modelfile +ollama create logic-reasoner -f Modelfile +ollama run logic-reasoner "If all humans are mortal and Socrates is human, what follows?" +``` + +### LM Studio + +Download any GGUF file and load directly in [LM Studio](https://lmstudio.ai/). + +## Prompt Formats + +**STEM derivation (Stage 1):** + +``` +Solve the following problem carefully and show a rigorous derivation. + +Problem: +[Your problem] + +Proof: +``` + +**Logical inference / instruction-following (Stage 2):** + +``` +### Instruction: +[Your question or logical inference problem] + +### Response: +``` + +## Limitations + +1.7B model. Structured reasoning with hard capacity limits. Not a code generator despite the Coder teacher. Not a formal proof verifier. Complex multi-step inferences with many quantifiers may exceed capacity. Always verify critical outputs. + +## Source Model + +Full training methodology at: **[reaperdoesntknow/Qwen3-1.7B-Coder-Distilled-SFT](https://huggingface.co/reaperdoesntknow/Qwen3-1.7B-Coder-Distilled-SFT)** + + +## Mathematical Foundations + +This is a GGUF-quantized variant. The mathematical foundations (Discrepancy Calculus, Topological Knowledge Distillation) are documented in the source model's card. The discrepancy operator $Df(x)$ and BV decomposition that inform the training pipeline are preserved through quantization — the structural boundaries detected by DISC during training are baked into the weights, not dependent on precision. + +## Related Models + +| Model | Description | +|---|---| +| [Qwen3-1.7B-Coder-Distilled](https://huggingface.co/reaperdoesntknow/Qwen3-1.7B-Coder-Distilled) | Stage 1 only | +| [Qwen3-1.7B-Coder-Distilled-SFT](https://huggingface.co/reaperdoesntknow/Qwen3-1.7B-Coder-Distilled-SFT) | Full precision source | +| [Qwen3-1.7B-Distilled-30B-A3B-SFT-GGUF](https://huggingface.co/reaperdoesntknow/Qwen3-1.7B-Distilled-30B-A3B-SFT-GGUF) | Instruct teacher + legal SFT GGUF | + +## Citation + +```bibtex +@misc{colca2026codersftgguf, + title={Coder-Distilled Logical Inference GGUF: Structured Reasoning for Edge Deployment}, + year={2026}, + publisher={HuggingFace}, + url={https://huggingface.co/reaperdoesntknow/Qwen3-1.7B-Coder-Distilled-SFT-GGUF}, + note={Convergent Intelligence LLC: Research Division} +} +``` + +--- + +*Convergent Intelligence LLC: Research Division* +*"Where classical analysis fails to see, we begin."* + +--- + +## Convergent Intelligence Portfolio + +*Part of the [Qwen3 Coder Series](https://huggingface.co/reaperdoesntknow) by [Convergent Intelligence LLC: Research Division](https://huggingface.co/reaperdoesntknow)* + + +# +## Mathematical Foundations + +This is a GGUF-quantized variant. The mathematical foundations (Discrepancy Calculus, Topological Knowledge Distillation) are documented in the source model's card. The discrepancy operator $Df(x)$ and BV decomposition that inform the training pipeline are preserved through quantization — the structural boundaries detected by DISC during training are baked into the weights, not dependent on precision. + +## Related Models + +| Model | Downloads | Format | +|-------|-----------|--------| +| [Qwen3-1.7B-Coder-Distilled-SFT](https://huggingface.co/reaperdoesntknow/Qwen3-1.7B-Coder-Distilled-SFT) | 302 | HF | + +### Top Models from Our Lab + +| Model | Downloads | +|-------|-----------| +| [Qwen3-1.7B-Thinking-Distil](https://huggingface.co/reaperdoesntknow/Qwen3-1.7B-Thinking-Distil) | 501 | +| [LFM2.5-1.2B-Distilled-SFT](https://huggingface.co/reaperdoesntknow/LFM2.5-1.2B-Distilled-SFT) | 342 | +| [Qwen3-0.6B-Distilled-30B-A3B-Thinking-SFT-GGUF](https://huggingface.co/reaperdoesntknow/Qwen3-0.6B-Distilled-30B-A3B-Thinking-SFT-GGUF) | 203 | +| [Qwen3-1.7B-Distilled-30B-A3B-SFT-GGUF](https://huggingface.co/reaperdoesntknow/Qwen3-1.7B-Distilled-30B-A3B-SFT-GGUF) | 175 | +| [SMOLM2Prover-GGUF](https://huggingface.co/reaperdoesntknow/SMOLM2Prover-GGUF) | 150 | + +**Total Portfolio: 41 models | 2,781 total downloads** + + +*Last updated: 2026-03-28 12:49 UTC* + + + +## DistilQwen Collection + +This model is part of the **[DistilQwen](https://huggingface.co/collections/reaperdoesntknow/distilqwen-69bf40ec669117e3f069ef1c)** proof-weighted distillation series. +Collection: **9 models** | **2,788 downloads** + +### Teacher Variant Comparison + +| Teacher | Student Size | Strength | Models | +|---------|-------------|----------|--------| +| Qwen3-30B-A3B (Instruct) | 1.7B | Instruction following, structured output, legal reasoning | 3 (833 DL) | +| Qwen3-30B-A3B (Thinking) | 0.6B | Extended deliberation, higher-entropy distributions, proof derivation | 3 (779 DL) | +| Qwen3-30B-A3B (Coder) | 1.7B | Structured decomposition, STEM derivation, logical inference | 2 (825 DL) **← this model** | + +### Methodology + +**The only BF16 collection in the portfolio.** While the broader Convergent Intelligence catalog (43 models, 12,000+ downloads) was trained on CPU at FP32 for $24 total compute, the DistilQwen series was trained on H100 at BF16 with a 30B-parameter teacher. Same methodology, premium hardware. This is what happens when you give the pipeline real compute. + +All models use proof-weighted knowledge distillation: 55% cross-entropy with decaying proof weights (2.5× → 1.5×), 45% KL divergence at T=2.0. The proof weight amplifies loss on reasoning-critical tokens, forcing the student to allocate capacity to structural understanding rather than surface-level pattern matching. + +Full methodology: [Structure Over Scale (DOI: 10.57967/hf/8165)](https://doi.org/10.57967/hf/8165) + +### Related in this series + +- [Qwen3-1.7B-Coder-Distilled-SFT](https://huggingface.co/reaperdoesntknow/Qwen3-1.7B-Coder-Distilled-SFT) (508 downloads) + + + +--- +Part of the [reaperdoesntknow research portfolio](https://huggingface.co/reaperdoesntknow) — 49 models, 22,598 total downloads | Last refreshed: 2026-03-30 12:05 UTC + + diff --git a/qwen3-1.7b-coder-distilled-sft-Q4_K_M.gguf b/qwen3-1.7b-coder-distilled-sft-Q4_K_M.gguf new file mode 100644 index 0000000..dbc1d0a --- /dev/null +++ b/qwen3-1.7b-coder-distilled-sft-Q4_K_M.gguf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:32a01f3a9f62dfc0b5c8a36e5ffd352d94ee97c39b2fa02ef4aa80b0c8e82e34 +size 1282439072 diff --git a/qwen3-1.7b-coder-distilled-sft-Q5_K_M.gguf b/qwen3-1.7b-coder-distilled-sft-Q5_K_M.gguf new file mode 100644 index 0000000..8a10ace --- /dev/null +++ b/qwen3-1.7b-coder-distilled-sft-Q5_K_M.gguf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:df8991f415c11cb28bea10b73c6a84c353c7588fa08105aabdcc503bffdaeb8f +size 1471805344 diff --git a/qwen3-1.7b-coder-distilled-sft-Q8_0.gguf b/qwen3-1.7b-coder-distilled-sft-Q8_0.gguf new file mode 100644 index 0000000..f504ee3 --- /dev/null +++ b/qwen3-1.7b-coder-distilled-sft-Q8_0.gguf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:3772161a82fef0de8f6629104615b9a3a114a3d8c52fcd0049716bd2bbe5a427 +size 2165039008 diff --git a/qwen3-1.7b-coder-distilled-sft-f16.gguf b/qwen3-1.7b-coder-distilled-sft-f16.gguf new file mode 100644 index 0000000..d3dec14 --- /dev/null +++ b/qwen3-1.7b-coder-distilled-sft-f16.gguf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:ae56de3355afa0b1cdc90deb941e6daf4a8bd5fb1a3ca74043aac5cb20896f62 +size 4069679008