An experimental QLoRA fine-tuned model for Typst code generation - shared for research and educational purposes
Warning: This is an experimental model that did not achieve production-quality results. It is shared for research transparency and educational purposes only.
This model is marked as experimental due to significant issues observed during evaluation.
Observed Issues
Issue
Description
Hallucinations
The model frequently generates incorrect or non-existent Typst syntax and features
Code Quality
Generated Typst code often contains syntax errors and fails to compile
These limitations make the model unsuitable for production use in document generation workflows.
Recommendations
If you experiment with this model:
Always validate generated Typst code before use
Expect compilation errors in most complex task outputs
Use for research purposes to understand fine-tuning challenges
Consider larger models or more training data for production use cases
Evaluation
Performance was evaluated qualitatively across multiple model versions (v1, v2, v3) using 10 diverse Typst generation test cases. Results consistently fell below the quality threshold required for the intended use cases.
How to Use
python
1from transformers import AutoModelForCausalLM, AutoTokenizer
23model_name ="jalasoft/smollm3-3B-it-ft-typ"4tokenizer = AutoTokenizer.from_pretrained(model_name)5model = AutoModelForCausalLM.from_pretrained(model_name, torch_dtype="float16")67messages =[8{9"role":"system",10"content":"You are an expert in Typst markup language. Generate clean, well-formatted Typst code based on user instructions:"11},12{13"role":"user",14"content":"Create a simple document with a title and two paragraphs"15}16]1718inputs = tokenizer.apply_chat_template(messages, return_tensors="pt")19outputs = model.generate(inputs, max_new_tokens=1000)20print(tokenizer.decode(outputs[0], skip_special_tokens=True))
Citation and Licensing
License
This model is released under the MIT License. You are free to use, modify, and distribute this model for any purpose, including commercial applications.
Citation
If you use this model in your research, please cite:
bibtex
1@misc{smollm3-typst-experimental,
2 author = {{Jala R\&D}},
3 title = {SmolLM3-3B Fine-Tuned for Typst (Experimental)},
4 year = {2025},
5 publisher = {Hugging Face},
6 howpublished = {\url{https://huggingface.co/jalasoft/smollm3-3B-it-ft-typ}}
7}