Jiaao's picture
Upload README.md with huggingface_hub
6dd8e9d verified
|
Raw
History Blame
1.11 kB
metadata
language:
  - en
license: apache-2.0
tags:
  - text-generation
  - transformers
pipeline_tag: text-generation

tiny-Qwen2ForCausalLM-2.5

Description

This is a tiny test model based on the Qwen2 architecture for text-generation tasks. It is designed for testing and development purposes.

Intended use

This model is intended for:

  • Testing and development of text generation pipelines
  • Research and experimentation with transformer models
  • Educational purposes

Limitations

This is a tiny test model with limited capabilities:

  • Not suitable for production use
  • Limited vocabulary and context length
  • May produce nonsensical outputs

How to use

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")

inputs = tokenizer("Hello, how are you?", return_tensors="pt")
outputs = model.generate(**inputs, max_new_tokens=50)
print(tokenizer.decode(outputs[0], skip_special_tokens=True))