Qwen3 0.6B Text FIM

This is a model trained to do fill-in-the-middle (FIM) with text.
This model is used in the browser-autocomplete extension.
It was fine tuned using Unsloth, code here.

Example code

from transformers import AutoModelForCausalLM, AutoTokenizer

model = AutoModelForCausalLM.from_pretrained("OleFranz/Qwen3-0.6B-Text-FIM")
tokenizer = AutoTokenizer.from_pretrained("OleFranz/Qwen3-0.6B-Text-FIM")

prefix = "do you k"
suffix = " the current time?"
prompt = f"<|fim_prefix|>{prefix}<|fim_suffix|>{suffix}<|fim_middle|>"

inputs = tokenizer(prompt, return_tensors="pt")
outputs = model.generate(
    **inputs,
    max_new_tokens=64,
    do_sample=True,
    temperature=0.1,
    pad_token_id=tokenizer.eos_token_id
)
middle = tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:], skip_special_tokens=True)

GREEN = "\x1b[32m"
RESET = "\x1b[0m"

print(f"Completed text:\n{prefix}{GREEN}{middle}{RESET}{suffix}\n--------------")

raw = tokenizer.decode(outputs[0])

print(f"\nRaw:\n{raw!r}\n---")
Downloads last month
55
Safetensors
Model size
596M params
Tensor type
BF16
·
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support

Model tree for OleFranz/Qwen3-0.6B-Text-FIM

Finetuned
(105)
this model
Quantizations
2 models

Dataset used to train OleFranz/Qwen3-0.6B-Text-FIM