How to use from the
Use from the
Transformers library
# Use a pipeline as a high-level helper
from transformers import pipeline

pipe = pipeline("text-generation", model="raincandy-u/Qwen1.5-1.8B_llamafy")
messages = [
    {"role": "user", "content": "Who are you?"},
]
pipe(messages)
# Load model directly
from transformers import AutoTokenizer, AutoModelForMultimodalLM

tokenizer = AutoTokenizer.from_pretrained("raincandy-u/Qwen1.5-1.8B_llamafy")
model = AutoModelForMultimodalLM.from_pretrained("raincandy-u/Qwen1.5-1.8B_llamafy")
messages = [
    {"role": "user", "content": "Who are you?"},
]
inputs = tokenizer.apply_chat_template(
	messages,
	add_generation_prompt=True,
	tokenize=True,
	return_dict=True,
	return_tensors="pt",
).to(model.device)

outputs = model.generate(**inputs, max_new_tokens=40)
print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:]))
Quick Links

Llamafied Qwen

This is a conversion of the Qwen1.5-1.8B model, adapted to the LLama architecture, aiming to augment its generality and suitability for academic research and broader computational linguistics applications.

Disclaimer

This conversion of the Qwen model is intended for research and educational purposes only. It is important to note that the converted model may generate more unpredictable responses compared to its original version. The user assumes full responsibility for any outcomes or consequences arising from the use of this converted model.

Acknowledgments

Special thanks go to @Minami-su for developing the conversion script that made this possible.

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

Collection including raincandy-u/Qwen1.5-1.8B_llamafy