tiny-random-Phi3ForCausalLM-LongRoPE-GGUF

A 2-layer Phi3ForCausalLM with random weights and the LongRoPE rope scaling of the long-context Phi-3 models, as GGUF files of llama.cpp, for the tests of the Unity package tools.doji.transformers. Its original context is 12 positions and its context is 48 positions, so a short prompt uses the short factors and generation switches to the long factors. It uses the sentencepiece tokenizer of microsoft/Phi-3-mini-4k-instruct (MIT license). 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

How the files were made

  • tools/causal_lm/make_models.py tiny --arch phi3_longrope --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 phi3. The files hold the factors in rope_factors_short and rope_factors_long, and the attention factor in phi3.rope.scaling.attn_factor.
  • tools/causal_lm/make_models.py gguf-references --f32 writes the reference logits and tokens of the tests.

Usage

using Doji.AI.Transformers;

var model = AutoModelForCausalLM.FromGguf("model-q8_0.gguf");
var tokenizer = AutoTokenizer.FromGguf("model-q8_0.gguf");
Downloads last month
220
GGUF
Model size
2.07M params
Architecture
phi3
Hardware compatibility
Log In to add your hardware

8-bit

16-bit

32-bit

Inference Providers NEW
This model isn't deployed by any Inference Provider. ๐Ÿ™‹ Ask for provider support