初始化项目,由ModelHub XC社区提供模型

Model: qvac/MedPsy-1.7B-GGUF
Source: Original Platform
This commit is contained in:
ModelHub XC
2026-06-14 15:34:18 +08:00
commit abfe7ed5c2
12 changed files with 1924 additions and 0 deletions

43
.gitattributes vendored Normal file
View File

@@ -0,0 +1,43 @@
*.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
medpsy-1.7b-iq3_m-imat.gguf filter=lfs diff=lfs merge=lfs -text
medpsy-1.7b-iq3_xxs-imat.gguf filter=lfs diff=lfs merge=lfs -text
medpsy-1.7b-iq4_nl-imat.gguf filter=lfs diff=lfs merge=lfs -text
medpsy-1.7b-iq4_xs-imat.gguf filter=lfs diff=lfs merge=lfs -text
medpsy-1.7b-q4_k_m-imat.gguf filter=lfs diff=lfs merge=lfs -text
medpsy-1.7b-q5_k_m-imat.gguf filter=lfs diff=lfs merge=lfs -text
medpsy-1.7b-q8_0.gguf filter=lfs diff=lfs merge=lfs -text
medpsy-1.7b-bf16.gguf filter=lfs diff=lfs merge=lfs -text

1295
ATTRIBUTIONS.md Normal file

File diff suppressed because it is too large Load Diff

178
LICENSE Normal file
View File

@@ -0,0 +1,178 @@
Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
1. Definitions.
"License" shall mean the terms and conditions for use, reproduction,
and distribution as defined by Sections 1 through 9 of this document.
"Licensor" shall mean the copyright owner or entity authorized by
the copyright owner that is granting the License.
"Legal Entity" shall mean the union of the acting entity and all
other entities that control, are controlled by, or are under common
control with that entity. For the purposes of this definition,
"control" means (i) the power, direct or indirect, to cause the
direction or management of such entity, whether by contract or
otherwise, or (ii) ownership of fifty percent (50%) or more of the
outstanding shares, or (iii) beneficial ownership of such entity.
"You" (or "Your") shall mean an individual or Legal Entity
exercising permissions granted by this License.
"Source" form shall mean the preferred form for making modifications,
including but not limited to software source code, documentation
source, and configuration files.
"Object" form shall mean any form resulting from mechanical
transformation or translation of a Source form, including but
not limited to compiled object code, generated documentation,
and conversions to other media types.
"Work" shall mean the work of authorship, whether in Source or
Object form, made available under the License, as indicated by a
copyright notice that is included in or attached to the work
(an example is provided in the Appendix below).
"Derivative Works" shall mean any work, whether in Source or Object
form, that is based on (or derived from) the Work and for which the
editorial revisions, annotations, elaborations, or other modifications
represent, as a whole, an original work of authorship. For the purposes
of this License, Derivative Works shall not include works that remain
separable from, or merely link (or bind by name) to the interfaces of,
the Work and Derivative Works thereof.
"Contribution" shall mean any work of authorship, including
the original version of the Work and any modifications or additions
to that Work or Derivative Works thereof, that is intentionally
submitted to Licensor for inclusion in the Work by the copyright owner
or by an individual or Legal Entity authorized to submit on behalf of
the copyright owner. For the purposes of this definition, "submitted"
means any form of electronic, verbal, or written communication sent
to the Licensor or its representatives, including but not limited to
communication on electronic mailing lists, source code control systems,
and issue tracking systems that are managed by, or on behalf of, the
Licensor for the purpose of discussing and improving the Work, but
excluding communication that is conspicuously marked or otherwise
designated in writing by the copyright owner as "Not a Contribution."
"Contributor" shall mean Licensor and any individual or Legal Entity
on behalf of whom a Contribution has been received by Licensor and
subsequently incorporated within the Work.
2. Grant of Copyright License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
copyright license to reproduce, prepare Derivative Works of,
publicly display, publicly perform, sublicense, and distribute the
Work and such Derivative Works in Source or Object form.
3. Grant of Patent License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
(except as stated in this section) patent license to make, have made,
use, offer to sell, sell, import, and otherwise transfer the Work,
where such license applies only to those patent claims licensable
by such Contributor that are necessarily infringed by their
Contribution(s) alone or by combination of their Contribution(s)
with the Work to which such Contribution(s) was submitted. If You
institute patent litigation against any entity (including a
cross-claim or counterclaim in a lawsuit) alleging that the Work
or a Contribution incorporated within the Work constitutes direct
or contributory patent infringement, then any patent licenses
granted to You under this License for that Work shall terminate
as of the date such litigation is filed.
4. Redistribution. You may reproduce and distribute copies of the
Work or Derivative Works thereof in any medium, with or without
modifications, and in Source or Object form, provided that You
meet the following conditions:
(a) You must give any other recipients of the Work or
Derivative Works a copy of this License; and
(b) You must cause any modified files to carry prominent notices
stating that You changed the files; and
(c) You must retain, in the Source form of any Derivative Works
that You distribute, all copyright, patent, trademark, and
attribution notices from the Source form of the Work,
excluding those notices that do not pertain to any part of
the Derivative Works; and
(d) If the Work includes a "NOTICE" text file as part of its
distribution, then any Derivative Works that You distribute must
include a readable copy of the attribution notices contained
within such NOTICE file, excluding those notices that do not
pertain to any part of the Derivative Works, in at least one
of the following places: within a NOTICE text file distributed
as part of the Derivative Works; within the Source form or
documentation, if provided along with the Derivative Works; or,
within a display generated by the Derivative Works, if and
wherever such third-party notices normally appear. The contents
of the NOTICE file are for informational purposes only and
do not modify the License. You may add Your own attribution
notices within Derivative Works that You distribute, alongside
or as an addendum to the NOTICE text from the Work, provided
that such additional attribution notices cannot be construed
as modifying the License.
You may add Your own copyright statement to Your modifications and
may provide additional or different license terms and conditions
for use, reproduction, or distribution of Your modifications, or
for any such Derivative Works as a whole, provided Your use,
reproduction, and distribution of the Work otherwise complies with
the conditions stated in this License.
5. Submission of Contributions. Unless You explicitly state otherwise,
any Contribution intentionally submitted for inclusion in the Work
by You to the Licensor shall be under the terms and conditions of
this License, without any additional terms or conditions.
Notwithstanding the above, nothing herein shall supersede or modify
the terms of any separate license agreement you may have executed
with Licensor regarding such Contributions.
6. Trademarks. This License does not grant permission to use the trade
names, trademarks, service marks, or product names of the Licensor,
except as required for reasonable and customary use in describing the
origin of the Work and reproducing the content of the NOTICE file.
7. Disclaimer of Warranty. Unless required by applicable law or
agreed to in writing, Licensor provides the Work (and each
Contributor provides its Contributions) on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
implied, including, without limitation, any warranties or conditions
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
PARTICULAR PURPOSE. You are solely responsible for determining the
appropriateness of using or redistributing the Work and assume any
risks associated with Your exercise of permissions under this License.
8. Limitation of Liability. In no event and under no legal theory,
whether in tort (including negligence), contract, or otherwise,
unless required by applicable law (such as deliberate and grossly
negligent acts) or agreed to in writing, shall any Contributor be
liable to You for damages, including any direct, indirect, special,
incidental, or consequential damages of any character arising as a
result of this License or out of the use or inability to use the
Work (including but not limited to damages for loss of goodwill,
work stoppage, computer failure or malfunction, or any and all
other commercial damages or losses), even if such Contributor
has been advised of the possibility of such damages.
9. Accepting Warranty or Additional Liability. While redistributing
the Work or Derivative Works thereof, You may choose to offer,
and charge a fee for, acceptance of support, warranty, indemnity,
or other liability obligations and/or rights consistent with this
License. However, in accepting such obligations, You may act only
on Your own behalf and on Your sole responsibility, not on behalf
of any other Contributor, and only if You agree to indemnify,
defend, and hold each Contributor harmless for any liability
incurred by, or claims asserted against, such Contributor by reason
of your accepting any such warranty or additional liability.
END OF TERMS AND CONDITIONS

384
README.md Normal file
View File

@@ -0,0 +1,384 @@
---
language:
- en
license: apache-2.0
license_link: https://huggingface.co/qvac/MedPsy-1.7B-GGUF/blob/main/LICENSE
library_name: gguf
base_model:
- qvac/MedPsy-1.7B
tags:
- medical
- healthcare
- clinical
- edge
- qwen3
- tether-ai
- text-generation
- on-device
- gguf
- quantized
- llama.cpp
- smartphone
pipeline_tag: text-generation
---
# MedPsy-1.7B-GGUF
**MedPsy-1.7B-GGUF** provides GGUF weights of [MedPsy-1.7B](https://huggingface.co/qvac/MedPsy-1.7B) for fast, fully on-device inference via [llama.cpp](https://github.com/ggml-org/llama.cpp) and the [QVAC SDK](https://qvac.tether.io/dev/sdk/). An unquantized **BF16 GGUF** file (about 4.07 GB) is included alongside seven quantization formats, ranging from near-lossless 8-bit (about 2.16 GB) through a high-quality 5-bit option (about 1.47 GB) down to ultra-compact 3-bit (about 0.89 GB), making the same model deployable across everything from laptops to entry-level smartphones.
| | |
|:---|:---|
| **Developed by** | [Tether AI Research](https://tether.io/) |
| **Model type** | Text-only causal language model (decoder-only transformer), GGUF quantized |
| **Base (BF16) model** | [MedPsy-1.7B](https://huggingface.co/qvac/MedPsy-1.7B) |
| **Backbone** | [Qwen3-1.7B (Thinking)](https://huggingface.co/Qwen/Qwen3-1.7B) |
| **Language** | English |
| **License** | [Apache 2.0](https://www.apache.org/licenses/LICENSE-2.0) |
| **Quantization tool** | [llama.cpp](https://github.com/ggml-org/llama.cpp) |
| **Technical report** | [MedPsy Technical Report](https://huggingface.co/blog/qvac/medpsy) |
| **Collection** | [MedPsy on Hugging Face](https://huggingface.co/collections/qvac/medpsy) |
| **All MedPsy variants** | [MedPsy-4B](https://huggingface.co/qvac/MedPsy-4B) · [MedPsy-1.7B](https://huggingface.co/qvac/MedPsy-1.7B) · [MedPsy-4B-GGUF](https://huggingface.co/qvac/MedPsy-4B-GGUF) · [MedPsy-1.7B-GGUF](https://huggingface.co/qvac/MedPsy-1.7B-GGUF) |
## Available Files
All published files are produced with [llama.cpp](https://github.com/ggml-org/llama.cpp). The **BF16 GGUF file is unquantized**: no quantization is applied. We have not separately re-evaluated the BF16 GGUF with llama.cpp; because it preserves the same BF16 tensor precision as the source checkpoint, performance is expected to match the BF16 source model evaluated with vLLM, aside from small backend or runtime differences. **Q8_0 does not use imatrix calibration** (we verified that imatrix provided no measurable benefit at 8-bit). All sub-8-bit variants use **importance-matrix (imatrix) calibration**, which consistently reduces quality degradation. See the [MedPsy Technical Report (Section 4.7)](https://huggingface.co/blog/qvac/medpsy) for the full quantization methodology, including the K-quants vs I-quants comparison and the per-bit-count imatrix ablation.
| File | Format | Imatrix | Size | Δ Size | Δ AVG (pts) | Δ AVG (rel %) | Recommended For |
|:---|:---:|:---:|:---:|:---:|:---:|:---:|:---|
| `medpsy-1.7b-bf16.gguf` | BF16 | n/a | 4.07 GB | 0% | **≈0.00** | **≈0.00%** | **Unquantized GGUF** (same performance expected) |
| `medpsy-1.7b-q8_0.gguf` | Q8_0 | no (not needed) | 2.16 GB | -47% | **0.00** | **0.00%** | **Best quality, near-lossless** |
| `medpsy-1.7b-q5_k_m-imat.gguf` | Q5_K_M | yes | 1.47 GB | -64% | **-0.02** | **-0.03%** | **Recommended high-quality 5-bit option** |
| `medpsy-1.7b-q4_k_m-imat.gguf` | Q4_K_M | yes | 1.28 GB | -69% | -0.73 | -1.10% | **Recommended for smartphone** (best size/quality trade-off) |
| `medpsy-1.7b-iq4_nl-imat.gguf` | IQ4_NL | yes | 1.23 GB | -70% | -1.70 | -2.56% | Alternative 4-bit (slightly worse than Q4_K_M) |
| `medpsy-1.7b-iq4_xs-imat.gguf` | IQ4_XS | yes | 1.18 GB | -71% | -1.79 | -2.69% | Smaller 4-bit alternative |
| `medpsy-1.7b-iq3_m-imat.gguf` | IQ3_M | yes | 1.03 GB | -75% | -3.58 | -5.40% | ⚠ Notable degradation, expect more hallucinations - **not recommended** for medical use |
| `medpsy-1.7b-iq3_xxs-imat.gguf` | IQ3_XXS | yes | 0.89 GB | -78% | -12.46 | -18.78% | ⚠ Severe degradation - **not recommended** |
> **Two ways to read quality loss.** *Δ AVG (pts)* is the **absolute** change in AVG Score vs the BF16/vLLM source-model baseline - the raw points lost. *Δ AVG (rel %)* is the **relative** change as a fraction of the baseline (`(baseline variant) / baseline`). They convey complementary information: the absolute delta is the easiest "how much score did I actually lose?" reading, while the relative delta normalizes by baseline so quality degradation is comparable across models with different starting scores. AVG Score = mean of HealthBench Overall and Closed-Ended Average.
## Quick Recommendation
| Your constraint | Choose |
|:---|:---|
| You want a llama.cpp-native unquantized file | **BF16** - no quantization applied; same quality as the source BF16 checkpoint expected, GGUF format (4.07 GB) |
| You want the best possible quality at smaller size | **Q8_0** - statistically indistinguishable from BF16, half the size |
| You want extra quality headroom over 4-bit | **Q5_K_M (imatrix)** - 64% smaller than BF16, only -0.02 pts (-0.03% rel) on AVG Score |
| You want the best size/quality trade-off (most users) | **Q4_K_M (imatrix)** - 69% smaller, only -0.73 pts (-1.10% rel) on AVG Score |
| You need the smallest 4-bit option | **IQ4_XS (imatrix)** - 71% smaller, -1.79 pts (-2.69% rel) (1.18 GB) |
| You need around 1 GB | IQ3_M, but be aware of important quality degradation and increased hallucination risk - **not recommended for medical use** |
## Benchmark Results
The comparison uses the **BF16 source model evaluated with vLLM** as the reference baseline. Quantized GGUF variants were evaluated on the full closed-ended benchmark suite (7 medical benchmarks, averaged) and HealthBench (CompassJudger-2-32B-Instruct as judge), using the same benchmark protocol. The BF16 GGUF file is the unquantized GGUF export and has not been separately re-run with llama.cpp; since no quantization is applied, its performance is expected to match the BF16 source model aside from small backend or runtime differences. **AVG Score** is the average of HealthBench Overall and Closed-Ended Average.
<table style="width:100%; border-collapse:collapse; font-size:14px; table-layout:fixed;">
<colgroup>
<col style="width:24%;">
<col style="width:7%;">
<col style="width:9%;">
<col style="width:8%;">
<col style="width:8%;">
<col style="width:10%;">
<col style="width:11%;">
<col style="width:12%;">
<col style="width:8%;">
</colgroup>
<thead>
<tr>
<th style="padding:10px 6px; text-align:left; border-bottom:2px solid #ddd;">Variant</th>
<th style="padding:10px 6px; text-align:center; border-bottom:2px solid #ddd;">Size (GB)</th>
<th style="padding:10px 6px; text-align:center; border-bottom:2px solid #ddd;">HealthBench</th>
<th style="padding:10px 6px; text-align:center; border-bottom:2px solid #ddd;">HB Hard</th>
<th style="padding:10px 6px; text-align:center; border-bottom:2px solid #ddd;">CE Avg</th>
<th style="padding:10px 6px; text-align:center; border-bottom:2px solid #ddd; color:#009393; font-weight:bold;">AVG Score</th>
<th style="padding:10px 6px; text-align:center; border-bottom:2px solid #ddd; color:#009393; font-weight:bold;">Δ AVG (pts)</th>
<th style="padding:10px 6px; text-align:center; border-bottom:2px solid #ddd; color:#009393; font-weight:bold;">Δ AVG (rel %)</th>
<th style="padding:10px 6px; text-align:center; border-bottom:2px solid #ddd;">Δ Size</th>
</tr>
</thead>
<tbody>
<tr style="background:rgba(0,147,147,0.08);">
<td style="padding:8px 6px; font-weight:bold;">MedPsy-1.7B (BF16, vLLM baseline)</td>
<td style="padding:8px 6px; text-align:center;">4.07</td>
<td style="padding:8px 6px; text-align:center;">70</td>
<td style="padding:8px 6px; text-align:center;">54</td>
<td style="padding:8px 6px; text-align:center;">62.62</td>
<td style="padding:8px 6px; text-align:center; font-weight:bold;">66.31</td>
<td style="padding:8px 6px; text-align:center;">0.00</td>
<td style="padding:8px 6px; text-align:center;">0.00%</td>
<td style="padding:8px 6px; text-align:center;">0%</td>
</tr>
<tr style="background:rgba(0,147,147,0.04);">
<td style="padding:8px 6px; font-weight:bold;">Q8_0 ★</td>
<td style="padding:8px 6px; text-align:center;">2.16</td>
<td style="padding:8px 6px; text-align:center;">70</td>
<td style="padding:8px 6px; text-align:center;">55</td>
<td style="padding:8px 6px; text-align:center;">62.62</td>
<td style="padding:8px 6px; text-align:center; font-weight:bold;">66.31</td>
<td style="padding:8px 6px; text-align:center; color:#009393; font-weight:bold;">0.00</td>
<td style="padding:8px 6px; text-align:center; color:#009393; font-weight:bold;">0.00%</td>
<td style="padding:8px 6px; text-align:center;">-47%</td>
</tr>
<tr style="background:rgba(0,147,147,0.04);">
<td style="padding:8px 6px; font-weight:bold;">Q5_K_M ★</td>
<td style="padding:8px 6px; text-align:center;">1.47</td>
<td style="padding:8px 6px; text-align:center;">70</td>
<td style="padding:8px 6px; text-align:center;">55</td>
<td style="padding:8px 6px; text-align:center;">62.58</td>
<td style="padding:8px 6px; text-align:center; font-weight:bold;">66.29</td>
<td style="padding:8px 6px; text-align:center; color:#009393; font-weight:bold;">-0.02</td>
<td style="padding:8px 6px; text-align:center; color:#009393; font-weight:bold;">-0.03%</td>
<td style="padding:8px 6px; text-align:center;">-64%</td>
</tr>
<tr style="background:rgba(0,147,147,0.04);">
<td style="padding:8px 6px; font-weight:bold;">Q4_K_M ★</td>
<td style="padding:8px 6px; text-align:center;">1.28</td>
<td style="padding:8px 6px; text-align:center;">69</td>
<td style="padding:8px 6px; text-align:center;">52</td>
<td style="padding:8px 6px; text-align:center;">62.16</td>
<td style="padding:8px 6px; text-align:center; font-weight:bold;">65.58</td>
<td style="padding:8px 6px; text-align:center; color:#009393; font-weight:bold;">-0.73</td>
<td style="padding:8px 6px; text-align:center; color:#009393; font-weight:bold;">-1.10%</td>
<td style="padding:8px 6px; text-align:center;">-69%</td>
</tr>
<tr>
<td style="padding:8px 6px;">IQ4_NL</td>
<td style="padding:8px 6px; text-align:center;">1.23</td>
<td style="padding:8px 6px; text-align:center;">69</td>
<td style="padding:8px 6px; text-align:center;">51</td>
<td style="padding:8px 6px; text-align:center;">60.22</td>
<td style="padding:8px 6px; text-align:center;">64.61</td>
<td style="padding:8px 6px; text-align:center;">-1.70</td>
<td style="padding:8px 6px; text-align:center;">-2.56%</td>
<td style="padding:8px 6px; text-align:center;">-70%</td>
</tr>
<tr>
<td style="padding:8px 6px;">IQ4_XS</td>
<td style="padding:8px 6px; text-align:center;">1.18</td>
<td style="padding:8px 6px; text-align:center;">69</td>
<td style="padding:8px 6px; text-align:center;">53</td>
<td style="padding:8px 6px; text-align:center;">60.05</td>
<td style="padding:8px 6px; text-align:center;">64.53</td>
<td style="padding:8px 6px; text-align:center;">-1.79</td>
<td style="padding:8px 6px; text-align:center;">-2.69%</td>
<td style="padding:8px 6px; text-align:center;">-72%</td>
</tr>
<tr style="background:rgba(245,180,0,0.10);">
<td style="padding:8px 6px;">IQ3_M ⚠</td>
<td style="padding:8px 6px; text-align:center;">1.03</td>
<td style="padding:8px 6px; text-align:center;">67</td>
<td style="padding:8px 6px; text-align:center;">49</td>
<td style="padding:8px 6px; text-align:center;">58.46</td>
<td style="padding:8px 6px; text-align:center;">62.73</td>
<td style="padding:8px 6px; text-align:center; color:#b07300; font-weight:bold;">-3.58</td>
<td style="padding:8px 6px; text-align:center; color:#b07300; font-weight:bold;">-5.40%</td>
<td style="padding:8px 6px; text-align:center;">-75%</td>
</tr>
<tr style="background:rgba(255,140,0,0.10);">
<td style="padding:8px 6px;">IQ3_XXS ⚠</td>
<td style="padding:8px 6px; text-align:center;">0.89</td>
<td style="padding:8px 6px; text-align:center;">59</td>
<td style="padding:8px 6px; text-align:center;">40</td>
<td style="padding:8px 6px; text-align:center;">48.71</td>
<td style="padding:8px 6px; text-align:center;">53.86</td>
<td style="padding:8px 6px; text-align:center; color:#cc5500; font-weight:bold;">-12.46</td>
<td style="padding:8px 6px; text-align:center; color:#cc5500; font-weight:bold;">-18.78%</td>
<td style="padding:8px 6px; text-align:center;">-79%</td>
</tr>
</tbody>
</table>
<p style="font-size:11px; color:#888; margin-top:8px; line-height:1.6;">
HB = HealthBench; CE = Closed-Ended Average (7 medical benchmarks). <b>Δ AVG (pts)</b> is the <b>absolute</b> point change in AVG Score vs the BF16/vLLM source-model baseline (e.g. 66.31 - 65.58 = -0.73). <b>Δ AVG (rel %)</b> is the <b>relative</b> change as a fraction of the baseline (e.g. -0.73 / 66.31 = -1.10%). Δ Size is the relative file-size change vs BF16. ★ Recommended variants (best of class). ⚠ Not recommended for medical use due to notable (IQ3_M) or severe (IQ3_XXS) quality degradation that increases hallucination risk. AVG Score = (HealthBench Overall + Closed-Ended Average) / 2. Results averaged over 3 runs with generation parameters: temperature=0.6, top_k=20, top_p=0.95, max_output_tokens=16384. Quantized GGUF variants were evaluated with llama.cpp; the BF16 baseline was evaluated with vLLM. HealthBench evaluated using CompassJudger-2-32B-Instruct.
</p>
## Key Findings
- **Q8_0 is effectively lossless**: identical AVG Score (66.31) to the BF16 baseline at 47% smaller (2.16 GB vs 4.07 GB), with no need for imatrix calibration.
- **Q5_K_M is a recommended high-quality option**: -0.02 pts (-0.03% relative) AVG Score at 64% smaller (1.47 GB), while matching Q8_0 on HealthBench and HealthBench Hard.
- **Q4_K_M is the sweet spot**: only -0.73 pts AVG Score loss (-1.10% relative) for a 69% size reduction, comfortably fitting in a typical mobile app's memory budget.
- **Smallest safe option is IQ4_XS** (1.18 GB, -1.79 pts / -2.69% relative): the smallest variant we recommend for medical use on this 1.7B model.
- **3-bit is too aggressive at 1.7B**: IQ3_M loses -3.58 pts (-5.40% relative) and IQ3_XXS loses -12.46 pts (-18.78% relative). At this model size, 3-bit quantization noticeably degrades reasoning quality and increases the risk of hallucinations. We do not recommend either variant for medical applications - if you need an aggressively-quantized model, prefer the [4B GGUF](https://huggingface.co/qvac/MedPsy-4B-GGUF) at IQ3_M (2.13 GB), which is far more robust at low bit counts.
- **Calibration matters at low bit counts**: imatrix calibration improves Q4_K_M closed-ended Average by +1.58 points; the effect grows at 3-bit quantizations.
## How Quantized Variants Compare to Other Models
Even the most aggressive *recommended* quantization (Q4_K_M at 1.28 GB) retains a **substantial accuracy lead** over the unquantized open-weight baselines in this size class:
<table style="width:100%; border-collapse:collapse; font-size:14px;">
<thead>
<tr>
<th style="padding:10px 14px; text-align:left; border-bottom:2px solid #ddd;">Model</th>
<th style="padding:10px 14px; text-align:center; border-bottom:2px solid #ddd;">Size (GB)</th>
<th style="padding:10px 14px; text-align:center; border-bottom:2px solid #ddd;">Closed-Ended Avg</th>
<th style="padding:10px 14px; text-align:center; border-bottom:2px solid #ddd;">HealthBench</th>
</tr>
</thead>
<tbody>
<tr style="background:rgba(0,147,147,0.08);">
<td style="padding:8px; font-weight:bold;">MedPsy-1.7B (BF16)</td>
<td style="padding:8px; text-align:center;">4.07</td>
<td style="padding:8px; text-align:center; font-weight:bold;">62.62</td>
<td style="padding:8px; text-align:center; font-weight:bold;">70</td>
</tr>
<tr style="background:rgba(0,147,147,0.04);">
<td style="padding:8px; font-weight:bold;">MedPsy-1.7B Q8_0 ★</td>
<td style="padding:8px; text-align:center;">2.16</td>
<td style="padding:8px; text-align:center; font-weight:bold;">62.62</td>
<td style="padding:8px; text-align:center; font-weight:bold;">70</td>
</tr>
<tr style="background:rgba(0,147,147,0.04);">
<td style="padding:8px; font-weight:bold;">MedPsy-1.7B Q5_K_M ★</td>
<td style="padding:8px; text-align:center;">1.47</td>
<td style="padding:8px; text-align:center; font-weight:bold;">62.58</td>
<td style="padding:8px; text-align:center; font-weight:bold;">70</td>
</tr>
<tr style="background:rgba(0,147,147,0.04);">
<td style="padding:8px; font-weight:bold;">MedPsy-1.7B Q4_K_M ★</td>
<td style="padding:8px; text-align:center;">1.28</td>
<td style="padding:8px; text-align:center; font-weight:bold;">62.16</td>
<td style="padding:8px; text-align:center; font-weight:bold;">69</td>
</tr>
<tr>
<td style="padding:8px;">Qwen3-1.7B (Thinking) (BF16, backbone)</td>
<td style="padding:8px; text-align:center;">4.07</td>
<td style="padding:8px; text-align:center;">49.95</td>
<td style="padding:8px; text-align:center;">53</td>
</tr>
<tr>
<td style="padding:8px;">LFM2.5-1.2B-Thinking (BF16)</td>
<td style="padding:8px; text-align:center;">2.6</td>
<td style="padding:8px; text-align:center;">44.15</td>
<td style="padding:8px; text-align:center;">49</td>
</tr>
</tbody>
</table>
## Usage
### llama.cpp
```bash
# Download the recommended file (Q4_K_M with imatrix - best size/quality for smartphone)
huggingface-cli download qvac/MedPsy-1.7B-GGUF medpsy-1.7b-q4_k_m-imat.gguf --local-dir .
# Run interactively
./llama-cli -m medpsy-1.7b-q4_k_m-imat.gguf \
-p "What are the common symptoms and first-line treatments for community-acquired pneumonia?" \
--temp 0.6 --top-k 20 --top-p 0.95 -n 1024
```
### QVAC SDK
These GGUF files are designed for deployment through the [QVAC SDK](https://qvac.tether.io/dev/sdk/), enabling fully private on-device inference on smartphones, tablets, and edge devices. See the [QVAC documentation](https://docs.qvac.tether.io/sdk/getting-started/quickstart/) for integration guides.
```js
# 1. Project setup
mkdir medpsy && cd medpsy
npm init -y && npm pkg set type=module
# 2. Install SDK + matching Bare runtime binary
# (swap linux-x64 for: linux-arm64 | darwin-arm64 | darwin-x64 | win32-x64 | win32-arm64)
npm i @qvac/sdk bare-runtime-linux-x64
# 3. Authenticate with Hugging Face (one-time) and download the recommended quant
hf auth login
hf download qvac/MedPsy-1.7B-GGUF medpsy-1.7b-q4_k_m-imat.gguf --local-dir ./models
# 4. Run inference (streamed, GPU)
node --input-type=module -e '
import { loadModel, completion, unloadModel, VERBOSITY } from "@qvac/sdk";
import { resolve } from "node:path";
const id = await loadModel({
modelSrc: resolve("./models/medpsy-1.7b-q4_k_m-imat.gguf"),
modelType: "llamacpp-completion",
modelConfig: { device: "gpu", ctx_size: 4096, verbosity: VERBOSITY.ERROR },
});
const r = completion({
modelId: id,
history: [{ role: "user", content: "First-line treatment for community-acquired pneumonia in 2 sentences." }],
stream: true,
generationParams: { temp: 0.6, top_p: 0.95, top_k: 20, predict: 2048 },
});
for await (const t of r.tokenStream) process.stdout.write(t);
const s = await r.stats;
console.log(`\n[${s.tokensPerSecond.toFixed(2)} tok/s, TTFT ${s.timeToFirstToken.toFixed(0)}ms, ${s.backendDevice}]`);
await unloadModel({ modelId: id });
'
```
Notes:
- If hf isn't installed: pip install --user "huggingface_hub[cli,hf_xet]" (or via your conda env).
- MedPsy is a Qwen3-Thinking model — it emits a <think>...</think> block before the answer, so keep predict ≥ 1500.
- For CPU-only boxes, set modelConfig.device: "cpu".
## Use and Limitations
### Intended Use
MedPsy-1.7B-GGUF is intended as a **starting point for developers and researchers** building downstream healthcare applications involving medical text on-device. Developers are expected to validate, adapt, and make meaningful modifications to the model for their specific use cases.
Appropriate use cases include:
- On-device medical information retrieval for privacy-sensitive environments, including smartphones
- Building developer tools and prototypes for health-related applications running on edge devices
- Research on medical language understanding and reasoning under aggressive quantization
Always with appropriate disclaimers.
### Limitations
> [!WARNING]
> This model is **NOT a substitute for professional medical judgment** and the model outputs are **NOT a substitute for proper clinical diagnosis**. Always consult with a certified physician. Despite strong benchmark performance, MedPsy-1.7B is a compact 1.7B-parameter language model, one of the smallest in its class, and **will make errors**. Quantization may further amplify rare-case failure modes that are not captured by aggregate benchmark numbers. Its small size makes it particularly susceptible to mistakes on complex, multi-step clinical reasoning tasks. Medical AI systems can produce outputs that appear confident and authoritative while being factually incorrect, incomplete, or clinically inappropriate.
**Known limitations include:**
- **Hallucinations**: The model may generate plausible-sounding but incorrect medical information.
- **Quantization artifacts**: Quantized models can occasionally produce subtly degraded outputs (rare-token drops, less stable formatting on long generations) that aggregate benchmarks may not capture. Effects grow at lower bit counts; we strongly recommend **4-bit (Q4_K_M, IQ4_NL, or IQ4_XS) or higher** for production medical deployment, and **avoid 3-bit variants (IQ3_M, IQ3_XXS) for medical use** at this model size - the degradation is large enough to materially increase hallucination risk.
- **Compact model trade-offs**: At 1.7B parameters, the model has inherently less capacity than larger models. It may struggle with rare conditions, complex multi-step reasoning, or nuanced clinical scenarios that require deep domain knowledge.
- **English only**: The model was trained and evaluated primarily in English. Performance in other languages is not validated.
- **Text only**: This model processes text inputs only. It cannot interpret medical images, lab results in non-text formats, or other modalities.
- **No real-time knowledge**: The model's knowledge has a training data cutoff and does not reflect the latest medical guidelines, drug approvals, or clinical evidence.
- **Bias in training data**: As with any model trained on synthetic and public medical data, biases in the source material may propagate to model outputs. Developers should validate performance across diverse patient populations, demographics, and clinical contexts.
- **Not designed for emergencies**: This model should never be used as the sole decision-making tool in emergency or life-threatening situations.
### Safety Recommendations
When integrating this model into any application:
1. **Always include visible disclaimers** informing users that outputs are AI-generated and not a substitute for professional medical advice
2. **Do not use for direct clinical diagnosis or treatment** without oversight by qualified healthcare professionals
3. **Monitor for harmful outputs** and implement appropriate safety filters in production systems
## Related Resources
- [MedPsy Collection](https://huggingface.co/collections/qvac/medpsy): All MedPsy models, datasets, and resources in one place
- [MedPsy-1.7B (BF16)](https://huggingface.co/qvac/MedPsy-1.7B): Full-precision source model
- [MedPsy-4B-GGUF](https://huggingface.co/qvac/MedPsy-4B-GGUF): Larger GGUF sibling for higher-quality edge deployment
- [MedPsy Technical Report](https://huggingface.co/blog/qvac/medpsy): Full quantization methodology and results (Section 4.7)
- [QVAC SDK](https://qvac.tether.io/dev/sdk/): On-device AI deployment framework
- [llama.cpp](https://github.com/ggml-org/llama.cpp): Inference engine and quantization toolchain
## Citation
```bibtex
@article{medpsy2026,
title={MedPsy: State-of-the-Art Medical and Healthcare Language Models for Edge Devices},
author={Vitabile, Davide and Buffa, Alexandro and Nambiar, Akshay and Nazir, Amril},
year={2026},
url={https://huggingface.co/blog/qvac/medpsy},
institution={Tether AI Research}
}
```
## Copyright
We will take appropriate actions in response to notices of copyright infringement. If you believe your work has been used or copied in a manner that infringes upon your intellectual property rights, please email [data-apps@tether.io](mailto:data-apps@tether.io) identifying and describing both the copyrighted work and alleged infringing content.
## Licensing
This model, which was trained as described in the [MedPsy Technical Report](https://huggingface.co/blog/qvac/medpsy), is licensed by Tether Data, S.A. de C.V. under the [Apache 2.0 license](https://huggingface.co/datasets/choosealicense/licenses/blob/main/markdown/apache-2.0.md) for research and educational purposes. As described above, this model is a version of [Qwen3-1.7B](https://huggingface.co/Qwen/Qwen3-1.7B), which is also available under the [Apache 2.0 license](https://huggingface.co/datasets/choosealicense/licenses/blob/main/markdown/apache-2.0.md).
As described above, a subset of the Genesis I and Genesis II datasets was used by the [Baichuan-M3-235B](https://huggingface.co/baichuan-inc/Baichuan-M3-235B) model, which itself is also available under the [Apache 2.0 license](https://huggingface.co/datasets/choosealicense/licenses/blob/main/markdown/apache-2.0.md) to generate synthetic data for training this model. The [Genesis I](https://huggingface.co/datasets/qvac/GenesisI) dataset is made available under the [CC-BY-NC 4.0](https://creativecommons.org/licenses/by-nc/4.0/legalcode.en) (Creative Commons Attribution-NonCommercial 4.0) license. The [Genesis II](https://huggingface.co/datasets/qvac/GenesisII) dataset is also made available under the [CC-BY-NC 4.0](https://creativecommons.org/licenses/by-nc/4.0/legalcode.en) license.

3
medpsy-1.7b-bf16.gguf Normal file
View File

@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:97ee99dfc4845218b369fbb16c85106bcfcf38f89e623346c891c3dc1b4b5ab1
size 4069679040

View File

@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:4f2aeaba2db768a80637a2b9666317d8453b7bcb59fcc2fc8f0e44e1178e2758
size 1029365952

View File

@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:fce8d5870bb9b22d29ff89f29491cb2b5662ec121ef0214c50cf7988068c37c8
size 888064192

View File

@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:e1a9cc5390e02007fc6a5c5a74a23e4c20e6e25ba81d99b6d21f491887e04979
size 1229453504

View File

@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:7816dbcdc90dcea1ec7ae3fe8a54d702e8d5c478493ee3a4605f71dfcb970409
size 1175689408

View File

@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:41ee947d9cce72ec657577219fd1798fabeabf0d832217fe23c9d6d3d18d5880
size 1282439360

View File

@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:05e8e51af9a09ebe06433971f66ba86f5ce1be2e8b53db9dc83b13244c33c00e
size 1471805632

3
medpsy-1.7b-q8_0.gguf Normal file
View File

@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:03ebb130aa6e818a8cf733301381c9edb69c94e0e1ad556595b1d5545a1c5073
size 2165039040