{"id":38247,"date":"2026-01-22T04:27:10","date_gmt":"2026-01-22T03:27:10","guid":{"rendered":"https:\/\/www.graviton.at\/letterswaplibrary\/i-fine-tuned-llama-3-2-1b-brazilian-address-parser-looking-for-honest-feedback\/"},"modified":"2026-01-22T04:27:10","modified_gmt":"2026-01-22T03:27:10","slug":"i-fine-tuned-llama-3-2-1b-brazilian-address-parser-looking-for-honest-feedback","status":"publish","type":"post","link":"https:\/\/www.graviton.at\/letterswaplibrary\/i-fine-tuned-llama-3-2-1b-brazilian-address-parser-looking-for-honest-feedback\/","title":{"rendered":"I Fine-tuned LLaMA 3.2 1B Brazilian Address Parser \u2014 Looking For Honest Feedback"},"content":{"rendered":"<p><!-- SC_OFF --><\/p>\n<div class=\"md\">\n<p>Recently, I posted here on Reddit asking for ideas on what I could build with a dataset of <strong>~2 million pairs of messy\/clean Brazilian addresses<\/strong>. A few kind folks shared some great suggestions, and one idea that really stood out was building an <strong>address parser<\/strong>.<\/p>\n<p>That pushed me into the world of <strong>LLM fine-tuning for the first time<\/strong>.<\/p>\n<p>I decided to partially fine-tune <strong>LLaMA 3.2 1B<\/strong>, focusing specifically on address normalization and field extraction (address, complement, neighborhood, city, state, country, coordinates, etc.). Surprisingly, the early results look quite promising.<\/p>\n<p>To properly evaluate it, I also built a <strong>small API<\/strong> to:<\/p>\n<ul>\n<li>Run inference tests<\/li>\n<li>Perform <strong>post-inference validation<\/strong><\/li>\n<li>Compute a <strong>confidence score<\/strong> based on consistency checks (postal code, city\/state match, field presence, etc.)<\/li>\n<\/ul>\n<p>Below is an example request body and the corresponding response.<\/p>\n<p><strong>Request<\/strong><\/p>\n<pre><code>{ \"inputs\": [ \"quadra -42.93386179 quadra arse 102 alameda 12 a, 5045 77023-582 brasil -21.26567258 palmas\", \"torre -43.02525939 bela vista 5 brasil minas gerais s\u00e3o jo\u00e3o do para\u00edso beco do p\u00f4r do sol, 4289 -19.14142529\" ] } <\/code><\/pre>\n<p><strong>Response<\/strong><\/p>\n<pre><code>[ { \"address\": \"Quadra Arse 102 Alameda 12 A, 5045\", \"complement\": \"quadra\", \"city\": \"Palmas\", \"country\": \"Brasil\", \"postal_code\": \"77023-582\", \"latitude\": \"-21.26567258\", \"longitude\": \"-42.93386179\", \"confidence\": 1.0, \"validation\": { \"postal_code_validation\": { \"is_valid\": true, \"found_in_input\": true, \"city_match\": true }, \"field_validation\": { \"address_found\": true, \"complement_found\": true, \"neighborhood_found\": false, \"city_found\": true, \"state_found\": false, \"country_found\": true } } }, { \"address\": \"Beco Do P\u00f4r Do Sol, 4289\", \"complement\": \"torre\", \"neighborhood\": \"Bela Vista 5\", \"city\": \"S\u00e3o Jo\u00e3o Do Para\u00edso\", \"state\": \"Minas Gerais\", \"country\": \"Brasil\", \"latitude\": \"-19.14142529\", \"longitude\": \"-43.02525939\", \"confidence\": 0.92, \"validation\": { \"postal_code_validation\": { \"is_valid\": false }, \"field_validation\": { \"address_found\": true, \"complement_found\": true, \"neighborhood_found\": true, \"city_found\": true, \"state_found\": true, \"country_found\": true, \"city_in_state\": false, \"neighborhood_in_city\": false } } } ] <\/code><\/pre>\n<p>I\u2019d really appreciate <strong>honest feedback<\/strong> from people more experienced with:<\/p>\n<ul>\n<li>Fine-tuning small LLMs<\/li>\n<li>Address parsing \/ entity extraction<\/li>\n<li>Post-inference validation strategies<\/li>\n<li>Confidence scoring approaches<\/li>\n<\/ul>\n<p>Does this look like a reasonable direction for a 1B model?<br \/> Anything you\u2019d improve architecturally or evaluation-wise?<\/p>\n<p>Thanks in advance \u2014 this project has been a great learning experience so far \ud83d\ude4f <\/p>\n<\/div>\n<p><!-- SC_ON -->   submitted by   <a href=\"https:\/\/www.reddit.com\/user\/Hour-Dirt-8505\"> \/u\/Hour-Dirt-8505 <\/a> <br \/> <span><a href=\"https:\/\/www.reddit.com\/r\/datasets\/comments\/1qjiok5\/i_finetuned_llama_32_1b_brazilian_address_parser\/\">[link]<\/a><\/span>   <span><a href=\"https:\/\/www.reddit.com\/r\/datasets\/comments\/1qjiok5\/i_finetuned_llama_32_1b_brazilian_address_parser\/\">[comments]<\/a><\/span><\/p><div class='watch-action'><div class='watch-position align-right'><div class='action-like'><a class='lbg-style1 like-38247 jlk' href='javascript:void(0)' data-task='like' data-post_id='38247' data-nonce='65e0e39b87' rel='nofollow'><img class='wti-pixel' src='https:\/\/www.graviton.at\/letterswaplibrary\/wp-content\/plugins\/wti-like-post\/images\/pixel.gif' title='Like' \/><span class='lc-38247 lc'>0<\/span><\/a><\/div><\/div> <div class='status-38247 status align-right'><\/div><\/div><div class='wti-clear'><\/div>","protected":false},"excerpt":{"rendered":"<p>Recently, I posted here on Reddit asking for ideas on what I could build with a dataset&#8230;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[85],"tags":[],"class_list":["post-38247","post","type-post","status-publish","format-standard","hentry","category-datatards","wpcat-85-id"],"_links":{"self":[{"href":"https:\/\/www.graviton.at\/letterswaplibrary\/wp-json\/wp\/v2\/posts\/38247","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.graviton.at\/letterswaplibrary\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.graviton.at\/letterswaplibrary\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.graviton.at\/letterswaplibrary\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.graviton.at\/letterswaplibrary\/wp-json\/wp\/v2\/comments?post=38247"}],"version-history":[{"count":0,"href":"https:\/\/www.graviton.at\/letterswaplibrary\/wp-json\/wp\/v2\/posts\/38247\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.graviton.at\/letterswaplibrary\/wp-json\/wp\/v2\/media?parent=38247"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.graviton.at\/letterswaplibrary\/wp-json\/wp\/v2\/categories?post=38247"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.graviton.at\/letterswaplibrary\/wp-json\/wp\/v2\/tags?post=38247"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}