Safetensors
qwen2

HyperCube-17B

A ~17B parameter reasoning/code model, built by merging two 14B-class Qwen2.5 models, depth-upscaling to 56 layers, and supervised fine-tuning on a curated math dataset.

This model is a research artifact. The model card describes exactly how it was built and, equally importantly, how it was measured — including where the measurements are thin.

  • Base architecture: Qwen2.5 (decoder-only, GQA, vocab 152,064, hidden 5,120)
  • Layers: 56 (upscaled from 48)
  • Parameters: ~17B (est.)
  • Precision: bf16 (raw weights); GGUF quantizations available (Q8_0, Q4_K_M)

Model Summary

  • Anchor model: DeepSeek-R1-Distill-Qwen-14B — the anchor that must dominate so that R1-style "thinking" (chain-of-thought) survives the merge.
  • Secondary model: Qwen2.5-Coder-14B-Instruct — the code/math paperweight whose knowledge is injected.
  • Merge: DARE-TIES with a cosine fade weight schedule. The cosine fade brings the secondary model's adapted weights in strongly early and fades them out later in the network, keeping the DeepSeek final layers (and its reasoning behavior) largely intact.
  • Depth upscale: 48 → 56 layers (interpolated/repeated block replication), so the merged model gets more capacity per parameter ratio. This is a speculative technique; it added capacity but there is no controlled ablation proving it improved quality.
  • SFT: LoRA (r=16, alpha=32, bf16) via Unsloth on 6,000 samples from zwhe99/DeepMath-103K, 1 epoch, sequence length 1792.
  • Output files: raw bf16 safetensors (this repo) and GGUF quantizations (Q8_0 17 GB, Q4_K_M 9.6 GB) in the sibling merged/GGUF repo.

How it was built (reproducible pipeline)

1. Merge (DARE-TIES + cosine fade)

  • Both source models loaded and merged via a streaming DARE-TIES procedure with a cosine fade weight across the network depth.
  • Anchor = R1-Distill-Qwen-14B; secondary = Qwen2.5-Coder-14B-Instruct.
  • Result: 8 shards, 29.5 GB, 579 tensors, verified.

2. Depth upscale 48 → 56 layers

  • 48 → 56 layers (8 added), following a block-replication/interpolation scheme.
  • Result: 33.94 GB, 675 tensors, verified (all tensors bf16).

3. Supervised fine-tuning (Unsloth, bf16 LoRA)

  • Data: 6,000 samples from DeepMath-103K (math problems with reasoning traces).
  • Method: Unsloth LoRA, r=16, alpha=32, bf16 (full precision training for the LoRA path; merged back into bf16 base at the end).
  • Masking: assistant-token masking applied manually (the DeepSeek tokenizer has no <|im_start|>; the question-subsequence is masked out so only the assistant answer/reasoning is learned). This was verified with a smoke test so that R1 "thinking" survives.
  • Packing disabled (UNSLOTH_DEFAULT_PACKING=0) — auto-packing would corrupt the pre-tokenized masked rows.
  • Run: 1 epoch, 188 steps, gradient accumulation 16, micro-batch 2 (32 docs/step), seq len 1792, ~80 minutes on a single A6000 48 GB.
  • Merged output: single bf16 model.safetensors (~32 GB), 675 tensors, 56 layers, verified.

4. Quantization (GGUF)

  • f16 GGUF (32 GB) → quantized with llama.cpp:
    • Q8_0 (17 GB)
    • Q4_K_M (9.6 GB)

Evaluation

⚠️ Read this before comparing numbers anywhere. All numbers below came from small subsets, not the full official test sets, and used an internal evaluation harness whose bugs were chased down one by one. The numbers are a sanity signal, not a leaderboard entry.

Benchmark Result Samples Method
GSM8K 90.0% (36/40) 40 5-shot, greedy, left-padded batched gen
ARC-Challenge 57.5% / 52.5% (acc / acc_norm) 40 0-shot, log-likelihood (lm-eval)
BBH (27 tasks) 63.2% (256/405) 15/task 0-shot, greedy, vLLM
Hendrycks MATH 35.2% (37/105) 15/subject 0-shot, greedy, max 2048 tokens, vLLM

How measurements were made (transparency)

  • 0-shot for reasoning benchmarks by design. Multi-shot exemplars were found to make this model regurgitate the few-shot template instead of reasoning (observed directly on raw outputs). MATH at 4-shot scored 21.0%; 0-shot with a 2048-token generation budget scored 35.2%.
  • GSM8K extraction: last number of the first output block. Validated against hand-checked samples (7/8, 87.5% on a small ground-truth check).
  • MATH extraction: CoT-end aware — last \boxed{}, else $...$ span, else last non-empty block, compared with the task's own is_equiv (mathematical equivalence).
  • BBH extraction: task-native flexible regex where defined, plus a per-task answer extractor (boxed-answer-aware with parenthesized-letter normalization). Raw outputs were dumped and inspected to confirm extraction was not inflating or deflating scores.
  • Generation backends: HF transformers for GSM8K/ARC/MATH-512; vLLM for BBH and MATH-2048. Greedy decoding everywhere. HF vs vLLM can differ at the kernel level on borderline tokens (a single BBH task moved 10→6/15 between backends with identical prompts/extraction).

Benchmark honesty

  • Sample sizes are 40 / 40 / 405 / 105 — not the full test sets. Standard errors are large; treat ±5 percentage-point swings as noise.
  • ARC uses a subset of 40; the full ARC-Challenge is 1,172 rows.
  • MATH was evaluated 0-shot (research method), not the more common 4-shot setup, and on a 105-sample subset, so it is not comparable to published MATH leaderboard numbers.
  • BBH was evaluated 0-shot; the conventional published BBH setup embeds few-shot exemplars, so again, not directly comparable.

Known limitations (be honest about these)

  • Small eval subsets — see above. Nothing here is a production-quality benchmark claim.
  • Reasoning-token starvation without a budget: at a 512-token generation cap the model gets cut off mid-reasoning (MATH 27.6% → 35.2% when max tokens went 512 → 2048). Always serve it with a generous max_new_tokens (≥1500, ideally 2048+).
  • Few-shot instability: the model loops/regurgitates exemplar templates under few-shot prompting on math. It is best used 0-shot with an "Answer:" prompt.
  • Weak specific skills (measured 0-shot, 15 samples each): BBH word_sorting (0/15), dyck_languages (1/15), ruin_names (3/15). Verified against raw outputs — these are real weaknesses, not extraction artifacts.
  • Depth upscale is unvalidated as a quality lever. It raised capacity; there was no controlled ablation to attribute any score change to it.
  • Quantization loss: Q4_K_M (9.6 GB) and Q8_0 (17 GB) were produced with default llama.cpp settings and were not re-benchmarked; expect small degradation vs bf16, more at Q4_K_M.
  • Single-GPU training regime: SFT used 6,000 samples for one epoch; this is a taste of math instruction tuning, not a large-scale training run.
  • Eval-topology note: the internal harness went through several bug fixes (wrong metric keys, missing boxed-answer extraction, generation-truncation interpretation). Final numbers above are from the corrected harness; earlier draft numbers (e.g., 21% → 35.2% MATH) reflected those bugs, not model changes.

Usage

Python / transformers (bf16, this repo)

import torch
from transformers import AutoModelForCausalLM, AutoTokenizer

# HyperCube-17B — raw bf16 weights
tokenizer = AutoTokenizer.from_pretrained("GenueAI/R1-Coder-17B-SFT", trust_remote_code=True)
model = AutoModelForCausalLM.from_pretrained(
    "GenueAI/R1-Coder-17B-SFT",
    torch_dtype=torch.bfloat16,
    device_map="auto",
    trust_remote_code=True,
).eval()

prompt = "Problem: Solve for x: 2x^2 + 3x - 5 = 0.\nAnswer:"
inputs = tokenizer(prompt, return_tensors="pt").to(model.device)
with torch.no_grad():
    out = model.generate(**inputs, max_new_tokens=2048, do_sample=False)
print(tokenizer.decode(out[0][inputs["input_ids"].shape[1]:], skip_special_tokens=True))

Important: use a large max_new_tokens (2048) — this model reasons at length and gets cut off at small budgets (see Limitations).

llama.cpp / GGUF (sibling repo GenueAI/R1-Coder-17B-Merged)

llama-cli -m sft17b-Q4_K_M.gguf \
  -p "Problem: Solve for x: 2x^2 + 3x - 5 = 0.\nAnswer:" \
  -n 2048 -no-cnv

Prompt format: Problem: <problem>\nAnswer: (0-shot) is what the model was trained/evaluated on. It responds answer-first (a training artifact) and then works through its reasoning.


License

  • This repository: licensed as configured on the repository (see the repo settings/license file). If it is not set explicitly on the repo page, it defaults under HF's terms — please set the license field to match your choice before sharing publicly.
  • Base models (attribution & upstream terms):
    • DeepSeek-R1-Distill-Qwen-14B — MIT license (DeepSeek).
    • Qwen2.5-Coder-14B-Instruct — Apache-2.0 (Alibaba Cloud).
  • Derived merges/upscales carry the terms of their upstream components; if you redistribute, include the upstream licenses and keep the model name/naming implications in mind (this is not an official DeepSeek or Qwen model).

Transparency statement

This model card intentionally reports:

  1. the exact pipeline (merge → upscale → SFT → quantize),
  2. the exact measurements and their limitations,
  3. the known weak spots verified on raw outputs, and
  4. the bug history of the eval harness used to derive the numbers.

It does not claim state-of-the-art results, principle-tested quality, or full-benchmark parity. It is a reproducible research artifact with honest numbers.


Contact / disclaimer

Built as a research exercise on a rented A6000. Not affiliated with DeepSeek, Alibaba/Qwen, or the DeepMath dataset authors. Use at your own risk; outputs can be factually wrong or harmful, especially for code execution and any high-stakes use.

Downloads last month
31
Safetensors
Model size
17B params
Tensor type
BF16
·
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support

Model tree for GenueAI/HyperCube-17B

Base model

Qwen/Qwen2.5-14B
Finetuned
(132)
this model
Quantizations
2 models

Dataset used to train GenueAI/HyperCube-17B