SAVRN
Search Contact SAVRN

Open-weight model · Text generation

duogpt-40m-v1

by Duoia Pung Duoia/duogpt-40m-v1

从零训练的 38.85M 参数英文小模型,消费级显卡(RTX 4060 Laptop 8GB)单卡训完。 本仓库同时提供了 GGUF 格式(由 model/litmodel.pth 直接转换,模板保持与训练一致),可直接用 Ollama 导入: scripts/chat.sh 里的三种问法: 在 Python 里直接用: - 只会做被交代的任务:给它一句裸问题(如 What is a volcano?)它不会回答;必须像上面那样把任务写清楚。 - 上下文上限 512 token:prompt +…

Parameters
Context
Weights209.6 MB
Licenseapache-2.0
AccessOpen weights
Monthly Downloads

Model Card

By Duoia Pung, published under apache-2.0, revision 4b016a2ab383.

从零训练的 38.85M 参数英文小模型,消费级显卡(RTX 4060 Laptop 8GB)单卡训完。 本仓库同时提供了 GGUF 格式(由 model/litmodel.pth 直接转换,模板保持与训练一致),可直接用 Ollama 导入: scripts/chat.sh 里的三种问法: 在 Python 里直接用: - 只会做被交代的任务:给它一句裸问题(如 What is a volcano?)它不会回答;必须像上面那样把任务写清楚。 - 上下文上限 512 token:prompt + 生成长度之和;超出会报 Cannot forward sequence of length T。 - 预训练语料:TinyStoriesV2-GPT4(CDLA-Sharing-1.0)与 Children-Stories(用户自备,含 GPT 生成内容) - 本包模型权重由上述数据从零训练得到,仅供研究与个人使用;若再分发请一并保留此说明与 MODELCARD.md。

Read Duoia Pung's full model card

DuoGPT-40M(一代)

从零训练的 38.85M 参数英文小模型,消费级显卡(RTX 4060 Laptop 8GB)单卡训完。

参数 38,854,144(bf16 约 78MB)
架构 Llama 风格:11 层 / d512 / 8 头 / SwiGLU / RoPE / RMSNorm,无 bias,权重绑定
词表 8192(自训 byte-level BPE)
上下文 512 token
预训练 745M token,3.37 小时,val ppl 4.96
SFT 334K 条(摘要 + 按词写故事),2.07 小时,val ppl 2.99

GGUF / Ollama 用法

本仓库同时提供了 GGUF 格式(由 model/lit_model.pth 直接转换,模板保持与训练一致),可直接用 Ollama 导入:

# 从 HF 拉取 GGUF(选一个量化档)
curl -L -o duogpt-40m.gguf \
  https://huggingface.co/Duoia/duogpt-40m-v1/resolve/main/duogpt-40m-v1-q4_k_m.gguf

# 用仓库里的 Modelfile 导入
ollama create duogpt-40m -f Modelfile
ollama run duogpt-40m "Where is Mary?"
文件 大小 说明
duogpt-40m-v1-q4_k_m.gguf 36 MB 推荐日常用(Q4_K_M 量化)
duogpt-40m-v1-f16.gguf 83 MB 无量化,质量最高
Modelfile - Ollama 导入配置(模板已按训练格式设置)

GGUF 版与 litgpt 版的 /q /s /t 命令效果一致:模板里已内置 <|user|> 包装, 直接 ollama run duogpt-40m "<问题>" 即等价于旧版 /q

快速开始

pip install -r requirements.txt        # 主要是 litgpt==0.5.13 + torch

bash scripts/chat.sh                   # 交互对话(默认加载 SFT 版)
bash scripts/ask.sh "Summarize the following story in one sentence."   # 单次提问

如果 python3 不是装好依赖的那个解释器,用 PYTHON=/path/to/python bash scripts/chat.sh 指定。

scripts/chat.sh 里的三种问法:

/q <问题>                 裸问句
/s <故事> | <问题>         带小故事的阅读理解
/t <指令> | <输入>         任意任务(概括、写故事都走这个)

目录

model/             SFT 版(推荐日常使用;会写故事/概括/做简单问答)
src/duogpt_prompt.py   必需的对话模板类(litgpt 加载时会找它,PYTHONPATH 已由脚本设好)
scripts/chat.sh   交互入口(自动指向本包内的模型)
scripts/ask.sh    单次提问入口
scripts/chat.py   chat.sh 的实现(一次加载、连续提问)
MODEL_CARD.md     完整模型卡:架构参数分布、数据构成、训练超参、评测数字

用法示例

# 明确任务(模型最擅长这类)
bash scripts/ask.sh "Write a short story for young children using these words: moon, basket, tiny"
bash scripts/ask.sh "Summarize the following story in one or two sentences.
Once upon a time, there was a little girl named Lily. She found a shiny red ball."

# 换模型 / 换参数
TEMP=0.3 MAXTOK=40 bash scripts/chat.sh

在 Python 里直接用:

from litgpt import LLM
llm = LLM.load("model")                      # 自动读取包内的 prompt_style
print(llm.generate("Summarize the following story in one sentence.\nOnce upon a time...",
                   max_new_tokens=60, temperature=0.7))

已知限制(重要,避免误判)

  • 只会做被交代的任务:给它一句裸问题(如 What is a volcano?)它不会回答;必须像上面那样把任务写清楚。
  • 没有知识:训练语料只有儿童故事,问事实性问题会瞎编。
  • 上下文上限 512 token:prompt + 生成长度之和;超出会报 Cannot forward sequence of length T
  • 写着写着会跑偏:39M 模型的常见病,长文本后半段容易失去一致性(实体串味、重复)。
  • 英文为主,只有儿童级词汇。

数据来源与许可

  • 预训练语料:TinyStoriesV2-GPT4(CDLA-Sharing-1.0)与 Children-Stories(用户自备,含 GPT 生成内容)
  • 本包模型权重由上述数据从零训练得到,仅供研究与个人使用;若再分发请一并保留此说明与 MODEL_CARD.md。

Identity and Version

Repository
Duoia/duogpt-40m-v1
Publisher
Duoia Pung
Task
Text generation
Modality
Text
Library
Not stated by the source
Parameters
Not stated by the source
Languages
en
Revision
4b016a2ab383b2148813eba80a3cd856266b490d
First published
2026-09-17
Last updated
2026-09-18

Files and Weights

18 files, 210.1 MB in total. The weights are 3 files totalling 209.6 MB in gguf, pth.

Weights3 files · 209.6 MB
Configuration5 files · 8.2 KB
Tokenizer2 files · 555.3 KB
Documentation2 files · 15.5 KB
Other5 files · 3.8 KB
Repository1 file · 1.6 KB
Every file
FileTypeSizeSHA-256
duogpt-40m-v1-f16.ggufWeights86.4 MB bf0c3245afeb
duogpt-40m-v1-q4_k_m.ggufWeights37.0 MB c2017aac15ad
model/lit_model.pthWeights86.1 MB 98c6517daf6d
model/hyperparameters.yamlConfiguration969 B
model/model_config.yamlConfiguration1.1 KB
model/prompt_style.yamlConfiguration39 B
scripts/chat.pyConfiguration4.9 KB
src/duogpt_prompt.pyConfiguration1.1 KB
MODEL_CARD.mdDocumentation10.8 KB
README.mdDocumentation4.6 KB
ModelfileOther588 B
SHA256SUMSOther1.4 KB
requirements.txtOther279 B
scripts/ask.shOther765 B
scripts/chat.shOther794 B
.gitattributesRepository1.6 KB
model/tokenizer.jsonTokenizer555.1 KB
model/tokenizer_config.jsonTokenizer243 B

License and Download

License
apache-2.0
Access
Open weights, no gate
Download size
209.6 MB
Download from Duoia Pung

Released by Duoia Pung through its official repository on Hugging Face. Read the license.

Memory Requirements

PrecisionWeights in memory
As published209.6 MB

Weights only, from the published parameter count; the key-value cache and runtime add to this.

Questions About duogpt-40m-v1

Can I use duogpt-40m-v1 commercially?

Yes. duogpt-40m-v1 is released under Apache License 2.0. The Apache License 2.0 is a permissive open-source license. It permits commercial use, modification and redistribution. It requires keeping the license and copyright notices and any NOTICE file, stating significant changes, and it includes an express patent grant from contributors.

Similar Models

Fine-tune Qwen3 (14B) for free using our Google Colab notebook! - Read our Blog about Qwen3 support: unsloth.ai/blog/qwen3 - View the rest of our notebooks in our docs here. Qwen3-Coder is available in multiple sizes. Today, we're excited to introduce Qwen3-Coder-30B-A3B-Instruct. This streamlined model maintains impressive performance and efficiency, featuring the following key enhancements: - Significant Performance among open models on Agentic Coding, Agentic Browser-Use, and other foundational coding tasks. - Long-context Capabilities with native support for 256K tokens, extendable up to 1M tokens using Yarn, optimized for repository-scale understanding. - Agentic Coding supporting for…

Open weights apache-2.0 transformers

Model · Text generation

opt-125m

AI at Meta

OPT was first introduced in Open Pre-trained Transformer Language Models and first released in metaseq's repository on May 3rd 2022 by Meta AI. Disclaimer: The team releasing OPT wrote an official model card, which is available in Appendix D of the paper. Content from this model card has been written by the Hugging Face team. To quote the first two paragraphs of the official paper OPT was predominantly pretrained with English text, but a small amount of non-English data is still present within the training corpus via CommonCrawl. The model was pretrained using a causal language modeling (CLM) objective. OPT belongs to the same family of decoder-only models like GPT-3. As such, it was…

Open weights other 2,048 tokens transformers

Model · Text generation

Ornith-1.5-9B-GGUF

Ornith

Chirp Chirp! We are introducing Ornith-1.5, a major step toward building foundation models through end-to-end self-improvement. Ornith-1.5 extends Ornith-1.0 (which was developed on top of Qwen3.5 and Gemma4 with additional continued pretraining, mid-training, and post-training) by expanding the self-improvement loop from scaffold and rollout optimization to jointly optimizing task generation, scaffold construction, and solution rollouts. Rather than relying on a fixed set of human-curated tasks and manually designed harnesses, Ornith-1.5 continuously generates new training tasks, discovers effective strategies for solving them, and improves the policy through reinforcement learning. For…

Open weights mit transformers

Model · Text generation

Ornith-1.5-35B-A3B-GGUF

Ornith

Chirp Chirp! We are introducing Ornith-1.5, a major step toward building foundation models through end-to-end self-improvement. Ornith-1.5 extends Ornith-1.0 (which was developed on top of Qwen3.5 and Gemma4 with additional continued pretraining, mid-training, and post-training) by expanding the self-improvement loop from scaffold and rollout optimization to jointly optimizing task generation, scaffold construction, and solution rollouts. Rather than relying on a fixed set of human-curated tasks and manually designed harnesses, Ornith-1.5 continuously generates new training tasks, discovers effective strategies for solving them, and improves the policy through reinforcement learning. For…

Open weights mit transformers

Model · Text generation

Ornith-1.0-9B-GGUF

Ornith

Aloha! Today, we are releasing Ornith-1.0, a self-improving family of open-source models for agentic coding. This model card documents Ornith-1.0-9B, the most lightweight member of the Ornith family, designed for efficient single-GPU deployment. Ornith-1.0-9B is a dense ~9B model (≈19 GB in bf16), so it serves comfortably on a single 80GB GPU. The recipes below stand up an OpenAI-compatible server; add --tensor-parallel-size / --tp if you want to shard across more GPUs. For a quick local test (or to script offline generation), load the model directly with Transformers. Make sure you have a recent release installed — see the Transformers installation guide; Ornith-1.0-9B requires…

Open weights mit transformers

Uncensored Qwen3.8-27B, published as GGUF quantizations with the multi token prediction (MTP) head retained and verified. Refusal behaviour has been substantially reduced, not eliminated. See Measured behaviour for the numbers. Capabilities, training data, and architecture are otherwise unchanged. - Refusal directions removed with Heretic, which co minimizes refusal count against KL divergence from the base model. No handwritten refusal removal code, no finetuning, no additional training data. - Abliteration runs at bf16 (no 4 bit quantization). the resulting LoRA is merged into the bf16 base, so the published weights are not a quantized round trip. - mtp. tensors are copied verbatim from…

Open weights apache-2.0 llama.cpp