{"id":40561329,"url":"https://github.com/ai4sd/number-token-loss","last_synced_at":"2026-04-08T00:01:24.888Z","repository":{"id":308789686,"uuid":"1032329951","full_name":"ai4sd/number-token-loss","owner":"ai4sd","description":"PyPI package for number token loss. ","archived":false,"fork":false,"pushed_at":"2026-02-22T11:26:20.000Z","size":1108,"stargazers_count":17,"open_issues_count":0,"forks_count":1,"subscribers_count":4,"default_branch":"main","last_synced_at":"2026-02-22T17:28:30.341Z","etag":null,"topics":["language-models","llm","llm-training","reasoning"],"latest_commit_sha":null,"homepage":"https://ibm.biz/ntl-docs","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ai4sd.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-08-05T06:42:00.000Z","updated_at":"2026-02-22T11:25:27.000Z","dependencies_parsed_at":"2025-08-07T23:32:33.659Z","dependency_job_id":"f54818ee-1e7a-4cfe-9b8d-b0f3d46773c7","html_url":"https://github.com/ai4sd/number-token-loss","commit_stats":null,"previous_names":["ai4sd/number-token-loss"],"tags_count":9,"template":false,"template_full_name":null,"purl":"pkg:github/ai4sd/number-token-loss","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ai4sd%2Fnumber-token-loss","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ai4sd%2Fnumber-token-loss/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ai4sd%2Fnumber-token-loss/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ai4sd%2Fnumber-token-loss/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ai4sd","download_url":"https://codeload.github.com/ai4sd/number-token-loss/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ai4sd%2Fnumber-token-loss/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31533824,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-07T16:28:08.000Z","status":"ssl_error","status_checked_at":"2026-04-07T16:28:06.951Z","response_time":105,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["language-models","llm","llm-training","reasoning"],"created_at":"2026-01-21T01:00:35.117Z","updated_at":"2026-04-08T00:01:24.866Z","avatar_url":"https://github.com/ai4sd.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cdiv align=\"center\"\u003e\n\n\n# `NTLoss` - a regression-like loss for LLMs\n\n\n[![Paper](https://img.shields.io/badge/Paper-ICML-darkgreen.svg)](https://ibm.biz/ntl-paper)\n[![Landing](https://img.shields.io/badge/Landing-Page-blue.svg)](https://ibm.biz/ntl-main)\n[![Demo](https://img.shields.io/badge/🤗-Demo-yellow.svg)](https://ibm.biz/ntl-demo)\n[![CI](https://github.com/AI4SD/number-token-loss/actions/workflows/ci.yaml/badge.svg)](https://github.com/AI4SD/number-token-loss/actions/workflows/ci.yaml)\n[![License](https://img.shields.io/badge/License-MIT-green.svg)](LICENSE)\n[![PyPI](https://img.shields.io/pypi/v/ntloss?label=pypi\u0026color=brightgreen)](https://pypi.org/project/ntloss/)\n[![Docs](https://github.com/AI4SD/number-token-loss/actions/workflows/docs.yaml/badge.svg)](https://ibm.biz/ntl-docs)\n[![Downloads](https://static.pepy.tech/badge/ntloss)](https://pepy.tech/project/ntloss)\n\n*`ntloss` is a PyPI package of the \"Number Token Loss\" for language models. A regression-like loss that improves LLM performance on math tasks. Follows* **Regress, Don't Guess, ICML 2025**\n\n\n\u003c/div\u003e\n\n---\n\n## 📖 Overview\nThis repo maintains the code for the `ntloss` [PyPI package](https://pypi.org/project/ntloss/)\n\n- 🧑🏽‍💻 **Paper source code**: [Regress, Don't Guess – ICML 2025](https://ibm.biz/ntl-code)\n- 📄 **Paper**: [Regress, Don't Guess – A Regression-like Loss on Number Tokens for Language Models](https://ibm.biz/ntl-paper)\n- 🌐 **Project Page**: [Landing Page](https://ibm.biz/ntl-main)\n- 🎮 **Demo**: [HuggingFace Spaces Demo (Streamlit)](https://ibm.biz/ntl-demo)\n- 📖 **Docs**: [Documentation for the PyPI package](https://ibm.biz/ntl-docs)\n\n\n## 🏃‍♂️ Quick Start\n\n\nSimply install `ntloss` into your existing project\n```sh\nuv add ntloss\npip install ntloss # if you are oldschool\n```\n\nUse like this:\n```py\nfrom ntloss import NTLoss\nntl_fn = NTLoss(tokenizer=tokenizer)\nntl = ntl_fn(logits, labels)\n\n# We recommend\nloss = cross_entropy(logits, labels) + 0.3 * ntl\n```\n\nNOTE: `ntloss` is currently in alpha phase and pre-release. Feedback \u0026 PRs are very welcome.\n\n\n## 📝 Citation\n\nIf you use `ntloss`, please cite our paper:\n\n```bibtex\n@inproceedings{zausinger2025regress,\n  title   = {Regress, Don't Guess – A Regression-like Loss on Number Tokens for Language Models},\n  author  = {Jonas Zausinger and Lars Pennig and Anamarija Kozina and Sean Sdahl\n             and Julian Sikora and Adrian Dendorfer and Timofey Kuznetsov\n             and Mohamad Hagog and Nina Wiedemann and Kacper Chlodny\n             and Vincent Limbach and Anna Ketteler and Thorben Prein\n             and Vishwa Mohan Singh and Michael Danziger and Jannis Born},\n  booktitle = {Proc. of the 42nd International Conference on Machine Learning (ICML)},\n  year    = {2025},\n  url     = {https://ibm.biz/ntl-main}\n}\n```\n\n## 📄 License\n\nThis project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fai4sd%2Fnumber-token-loss","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fai4sd%2Fnumber-token-loss","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fai4sd%2Fnumber-token-loss/lists"}