--- base_model: google/gemma-3-1b-it library_name: transformers model_name: gemma-text-to-bill tags: - generated_from_trainer - trl - sft licence: license --- # Model Card for gemma-text-to-bill This model is a fine-tuned version of [google/gemma-3-1b-it](https://huggingface.co/google/gemma-3-1b-it). It has been trained using [TRL](https://github.com/huggingface/trl). ## Quick start ```python from transformers import pipeline question = "If you had a time machine, but could only go to the past or the future once and never return, which would you choose and why?" generator = pipeline("text-generation", model="peanutpan/gemma-text-to-bill", device="cuda") output = generator([{"role": "user", "content": question}], max_new_tokens=128, return_full_text=False)[0] print(output["generated_text"]) ``` ## Example Question: ```text user 给定交易文本 当前时间是2025年4月25日, 从中识别出:1. 金额(数值型),2. 商户全称(最长的名称),3. 交易时间(格式:yyyy-MM-dd)。返回JSON格式:{ "amount": double, "company": str, "time": str } PY市场-虚拟物品购买 文化休闲 今天10:06 -5.00 ``` Answer: ```text {"amount":-5.0,"company":"PY市场","time":"2025/04/25"} ``` ## Training procedure This model was trained with SFT. ### Framework versions - TRL: 0.15.2 - Transformers: 4.51.3 - Pytorch: 2.6.0+cu124 - Datasets: 3.3.2 - Tokenizers: 0.21.1 ## Citations Cite TRL as: ```bibtex @misc{vonwerra2022trl, title = {{TRL: Transformer Reinforcement Learning}}, author = {Leandro von Werra and Younes Belkada and Lewis Tunstall and Edward Beeching and Tristan Thrush and Nathan Lambert and Shengyi Huang and Kashif Rasul and Quentin Gallouédec}, year = 2020, journal = {GitHub repository}, publisher = {GitHub}, howpublished = {\url{https://github.com/huggingface/trl}} } ```