/ Модель

Характеристики

Контекст
40 960 токенов
Параметры
7,6 млрд
Размер весов
16,4 ГБ
Лицензия
Apache 2.0
Архитектура
qwen3 · dense
Базовая модель
Qwen3-8B
Библиотека
transformers
Опубликована
1 ноя 2026

torchlight-qwen3-8b

Генерация текстаТекст → текст

Русское описание этой модели ещё готовится. Пока можно заглянуть в карточку модели от автора ниже.

1 343скачиваний за 30 дней1лайквеса обновлены1 ноя 2026

Бенчмарки

Как модель справилась с задачами пользователей ailist и что о ней публикуют открытые лидерборды

Тесты пользователейпока нет

Никто ещё не опубликовал тест этой модели. Соберите бенчмарк из своих задач — результат появится здесь.

  1. Добавьте модель в бенчмарк

    Вместе с другими моделями категории «Текст» — сравнение идёт внутри одной категории.

  2. Опишите свои задачи

    Напишите запросы, при необходимости приложите файлы и эталонные ответы.

  3. Запустите и опубликуйте

    Модели ответят на каждую задачу, судья оценит ответы. Опубликованный результат появится на этой странице.

Публичные оценки

Из открытых лидербордов. Сравнивайте результаты одного теста при одинаковых условиях — отсутствие оценки не значит, что модель хуже.

В подключённых источниках результатов для этой модели пока нет.

Карточка модели

README от автора на Hugging Face, как он его опубликовал

Открыть на Hugging Face

torchlight-qwen3-8b

This repo has the full model, with the fine-tuning merged in.

Model Overview

torchlight is a small model that helps with PyTorch questions. It is Qwen3-8B (8.2B parameters), fine-tuned on 6,902 chats from the PyTorch forums. Most end with the answer that solved the thread; the rest teach it to ask for missing details.

It was trained not to guess: when a question has enough detail, suggest a fix; when it doesn't, ask for the code or the full error.

  • Trained on real answers. Each answer is the post that solved the thread. Most were written by ptrblck.
  • Tested on new questions. 163 forum questions that are newer than anything the model saw in training.
  • Trained for free. 4.1 hours on one Tesla T4 GPU on Kaggle.

Model Details

Base modelQwen/Qwen3-8B
Size8.2B parameters (43.6M trained with LoRA)
Training datasamadpls/torchlight-threads
LanguageEnglish
LicenseApache-2.0
AuthorAbdul Samad
Codegithub.com/samadpls/torchlight

The model comes in three versions:

RepoWhat it isUse it with
samadpls/torchlight-qwen3-8bFull model (16-bit)transformers, mlx-lm
samadpls/torchlight-qwen3-8b-loraLoRA adapter onlyPEFT
samadpls/torchlight-qwen3-8b-GGUFGGUF files (Q4_K_M, Q8_0)llama.cpp, Ollama, LM Studio

⚡ Quickstart

Transformers

from transformers import AutoModelForCausalLM, AutoTokenizer

SYSTEM_PROMPT = "You are a careful PyTorch helper. Give specific, correct guidance with code where it helps. If a question lacks the details needed to answer it, ask for them, for example a minimal executable code snippet or the full error message, instead of guessing."

repo = "samadpls/torchlight-qwen3-8b"
tokenizer = AutoTokenizer.from_pretrained(repo)
model = AutoModelForCausalLM.from_pretrained(repo, dtype="auto", device_map="auto")
messages = [
    {"role": "system", "content": SYSTEM_PROMPT},
    {"role": "user", "content": "How do I check which device a tensor is on?"},
]
# The model was trained with thinking mode off.
text = tokenizer.apply_chat_template(
    messages, add_generation_prompt=True, tokenize=False, enable_thinking=False
)
inputs = tokenizer(text, return_tensors="pt").to(model.device)
output = model.generate(**inputs, max_new_tokens=512)
print(tokenizer.decode(output[0][inputs.input_ids.shape[1]:], skip_special_tokens=True))

mlx-lm (Apple Silicon)

pip install mlx-lm
mlx_lm.generate --model samadpls/torchlight-qwen3-8b --max-tokens 512 \
  --system-prompt "You are a careful PyTorch helper. Give specific, correct guidance with code where it helps. If a question lacks the details needed to answer it, ask for them, for example a minimal executable code snippet or the full error message, instead of guessing." \
  --prompt "How do I check which device a tensor is on?" \
  --chat-template-config '{"enable_thinking": false}'

Use the same system prompt as in the examples. The model was trained with it.

📊 Evaluation

We asked 163 forum questions from 2025-04-01 to 2026-10-08 to four models. They are newer than Qwen3-8B's training data, which reportedly runs to March 2025. Claude Opus 5.5, acting as judge, scored each answer from 1 to 5 by comparing it with the answer that solved the thread.

ModelAverage grade (out of 5)Graded 4 or 5Wrong answers (graded 1)Code with only real torch APIsAsked for details, when they were missingAsked for details, when not needed
Phi-4-mini (base model)1.965%33%108 of 1090 of 41%
torchlight-phi4-mini (fine-tuned)2.098%16%5 of 50 of 45%
Qwen3-8B (base model)2.1717%31%114 of 1200 of 41%
torchlight-qwen3-8b (fine-tuned)2.259%15%11 of 113 of 413%

What the results show

  • Half as many wrong answers. Fine-tuning cut answers graded 1 (wrong) from 31% to 15% for Qwen3-8B, and from 33% to 16% for Phi-4-mini. Both gaps are real, not chance (p < 0.001).
  • The bigger model helps. Qwen3-8B beats Phi-4-mini both before fine-tuning (2.17 against 1.96) and after (2.25 against 2.09). Both gaps are real (95% intervals +0.04 to +0.39 and +0.03 to +0.29).
  • It asks for missing details. On the 4 questions where the expert first asked for more information, torchlight-qwen3-8b asked too on 3. None of the other models asked on any. It also asks when it doesn't need to on 13% of the other questions.
  • But it gives fewer complete fixes than Qwen3-8B itself. 9% of its answers were graded 4 or 5, against 17% for the base model (p = 0.02). The base model writes long answers (a median of 1,024 tokens, often cut off) that more often contain the exact fix. The fine-tune learned the forum's short style (a median of 42 tokens).
  • On average, the fine-tune is a little ahead of Qwen3-8B (2.25 against 2.17), but that gap is too small to be sure of (95% interval −0.09 to +0.23).
  • The test is hard by design. These 163 questions are newer than Qwen3-8B's training data, and a 4 or 5 needs the same fix that solved the thread.
  • Models. Qwen3-8B and this model, plus Phi-4-mini and torchlight-phi4-mini, the earlier and smaller fine-tune. None of them searches the forum here.
  • Settings. Greedy decoding (no sampling), up to 1,024 new tokens, and Qwen3's thinking mode off. The Qwen models run in 16-bit on a Kaggle GPU.
  • Scoring. The judge sees all four answers to a question together, shuffled and without names. It follows prompts/judge.md.
  • Valid torch APIs. A script checks that every torch.* name in an answer's code exists in PyTorch 2.15.
  • Asks for details. How often an answer asks for more information. This is measured on the 4 questions where the expert also asked, and on the other 159, where asking less is better.

Training Details

Data. 6,902 chats from forum threads created before 2024-07-01. Each chat ends with the answer that solved the thread. 23 chats longer than 4,096 tokens were left out. The 169 validation chats come from 2024-07-01 to 2025-01-01. The test questions are newer than both.

Settings.

MethodLoRA on every linear layer of all layers; the base weights stay frozen in 4-bit (QLoRA)
LoRA rank / alpha16 / 32
Learning rate2e-4, cosine schedule, 5% warmup
Batch2 chats, 4 accumulation steps (8 chats per update)
Epochs1 (863 steps)
Max length4,096 tokens
LossOn the final answer only
OptimizerAdamW 8-bit, weight decay 0.01
HardwareOne Tesla T4 GPU on Kaggle, 4.1 hours
SoftwareUnsloth 2026.10.11, Transformers 5.16.1

Training results.

EpochStepTraining lossValidation loss
0.000-3.059
0.232001.5401.606
0.464001.3991.572
0.706001.3981.538
0.938001.3801.532
1.008631.3581.532

Training loss is the average since the previous row. Step 0 is the base model before training; each step is 8 chats.

Intended Use

Good for: PyTorch questions about errors, tensor shapes, training loops, data loading and CUDA.

Not for: code you run without reading, other frameworks, PyTorch features from after mid-2024, or anything where a wrong answer can cause harm.

⚠️ Limitations

  • It is a small model and can be wrong while sounding sure. Check its code.
  • Its answers are short, like the forum's. It gives fewer complete fixes than Qwen3-8B itself (9% of answers graded 4 or 5, against 17%), which writes much longer answers.
  • It sometimes asks for details it doesn't need (on 13% of questions that could be answered).
  • It knows PyTorch up to early 2025.
  • The training data leans toward ptrblck's topics: debugging, CUDA, training loops and shape errors.
  • English only.

License and Credits

The model is released under the Apache-2.0 license, like the base model. The training data, samadpls/torchlight-threads, is under CC BY 4.0. The answers in it were written by the PyTorch forum community, above all ptrblck, and every row links to its thread. This model is not made or endorsed by PyTorch or the Linux Foundation.

Citation

@misc{samad2026torchlight_qwen3,
  author = {Abdul Samad},
  title = {torchlight: a PyTorch helper fine-tuned on resolved forum threads},
  year = {2026},
  url = {https://huggingface.co/samadpls/torchlight-qwen3-8b}
}

Contact

Made by Abdul Samad (samadpls.com · GitHub @samadpls). Questions or corrections: abdulsamadsid1@gmail.com.

Как запустить

На своей GPU в ailist. Цена — по текущим предложениям провайдеров

GPU в ailist

Универсальный рантайм · transformers

Можно запустить

Подбираем GPU…

Класс архитектуры
Qwen3ForCausalLM
Ревизия весов
1f5f56c

0 моделей