A 2-layer Qwen2ForCausalLM with random weights, as GGUF files of llama.cpp, for the tests of the Unity package tools.doji.transformers. It has 4 query heads and 2 key and value heads, and the biases of the query, key and value projections of Qwen2. It uses the tokenizer of Qwen/Qwen2.5-0.5B-Instruct (Apache 2.0 license), with the pre-tokenizer qwen2. It generates random text.
| File | Tensor types |
|---|---|
model-f32.gguf |
All tensors F32 |
model-bf16.gguf |
Matrices BF16, norms F32 |
model-q8_0.gguf |
Matrices Q8_0, norms F32 |
tools/causal_lm/make_models.py tiny --arch qwen2 --no-onnx in the package repository makes the transformers model.convert_hf_to_gguf.py of llama.cpp (commit 244640b7f26e2a7301b27a24edc4f7feaf97d52f) converts it, with --outtype f32, bf16 or q8_0. The architecture in the files is qwen2.tools/causal_lm/make_models.py gguf-references --f32 writes the reference logits and tokens of the tests.using Doji.AI.Transformers;
var model = AutoModelForCausalLM.FromGguf("model-q8_0.gguf");
var tokenizer = AutoTokenizer.FromGguf("model-q8_0.gguf");