tiny Qwen2ForCausalLM 2.5

Providertrl-internal-testing
Categorytext-generation
LicenseApache-2.0
Downloads15.6M
Stars0

Overview

The tiny Qwen2ForCausalLM 2.5 is a compact, efficient language model designed for low-latency applications and edge deployment. Built on the Qwen2 architecture, it prioritizes a minimal memory footprint without sacrificing basic causal reasoning capabilities. For developers, this makes it an ideal candidate for specialized tasks like text classification, basic entity extraction, or as a fast drafting engine in a multi-model pipeline. Its Apache-2.0 license ensures seamless integration into commercial projects. Compared to larger LLMs, it trades broad general knowledge for speed and cost-efficiency, making it highly effective for targeted, high-throughput production environments where resource overhead is a primary constraint.

Highlights

  • Low-latency performance for edge and resource-constrained environments
  • Apache-2.0 license for flexible commercial integration
  • Optimized for high-throughput, specialized text generation tasks
  • Efficient memory footprint reduces infrastructure overhead

Usage

Install
# Install Hugging Face transformers
pip install transformers torch
SDK Usage
# Load model with transformers
from transformers import AutoModel, AutoTokenizer

model = AutoModel.from_pretrained("trl-internal-testing/tiny-Qwen2ForCausalLM-2.5")
tokenizer = AutoTokenizer.from_pretrained("trl-internal-testing/tiny-Qwen2ForCausalLM-2.5")

Hugging Face Download

We recommend downloading the model via the Hugging Face CLI or Hub SDK.

Guidance:Before downloading, install huggingface_hub with:

Guidance
pip install -U huggingface_hub

CLI Download

Download the full repository

Download the full repository
huggingface-cli download trl-internal-testing/tiny-Qwen2ForCausalLM-2.5

Download a single file to a local folder (e.g. config.json into ./dir)

Download a single file to a local folder (e.g. config.json into ./dir)
huggingface-cli download trl-internal-testing/tiny-Qwen2ForCausalLM-2.5 config.json --local-dir ./dir

See the official docs for more CLI options

SDK Download

SDK Download
# 模型下载
from huggingface_hub import snapshot_download
model_dir = snapshot_download('trl-internal-testing/tiny-Qwen2ForCausalLM-2.5')

Git Download

Make sure git-lfs is installed first

Git Download
git lfs install
git clone https://huggingface.co/trl-internal-testing/tiny-Qwen2ForCausalLM-2.5

To skip LFS large-file downloads, use:

Skip LFS
GIT_LFS_SKIP_SMUDGE=1 git clone https://huggingface.co/trl-internal-testing/tiny-Qwen2ForCausalLM-2.5

Model files are hosted on the Hugging Face Hub — download directly via HF CLI / SDK / Git, not through this site.

PyTorch / Transformers Usage

Install Transformers

Install Transformers
pip install -U transformers torch

Load the model and run inference

Load the model and run inference
from transformers import AutoModelForCausalLM, AutoTokenizer

model = AutoModelForCausalLM.from_pretrained('trl-internal-testing/tiny-Qwen2ForCausalLM-2.5')
tokenizer = AutoTokenizer.from_pretrained('trl-internal-testing/tiny-Qwen2ForCausalLM-2.5')

Full Documentation

来源: HuggingFace

---
library_name: transformers
tags:

  • trl

---

Tiny Qwen2ForCausalLM

This is a minimal model built for unit tests in the TRL library.

Join our Telegram