{"id":19758,"date":"2026-08-25T09:00:00","date_gmt":"2026-08-25T09:00:00","guid":{"rendered":"https:\/\/amara-marketing.com\/blog-tecnologia\/how-to-choose-slm\/"},"modified":"2026-08-26T21:46:12","modified_gmt":"2026-08-26T21:46:12","slug":"how-to-choose-slm","status":"publish","type":"post","link":"https:\/\/amara-marketing.com\/en\/sin-categorizar\/how-to-choose-slm\/","title":{"rendered":"How to Choose an SLM and Deploy It in Your Project Step by Step"},"content":{"rendered":"<div id=\"bsf_rt_marker\"><\/div><p>Choosing an SLM \u2014a <strong>Small Language Model<\/strong>\u2014 is one of the most relevant technical decisions you can make when you want to integrate AI into a project without depending on external APIs or incurring exorbitant costs. Knowing how to choose an SLM correctly involves evaluating specific technical criteria, knowing the available tools and following an orderly implementation process. This guide takes you from the decision to deployment, including advanced patterns such as RAG and fine-tuning.<\/p><div id=\"ez-toc-container\" class=\"ez-toc-v2_0_85 counter-hierarchy ez-toc-counter ez-toc-custom ez-toc-container-direction\">\n<div class=\"ez-toc-title-container\"><p class=\"ez-toc-title\" style=\"cursor:inherit\">Contenidos<\/p>\n<\/div><nav><ul class='ez-toc-list ez-toc-list-level-1 ' ><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-1\" href=\"https:\/\/amara-marketing.com\/en\/sin-categorizar\/how-to-choose-slm\/#What_is_an_SLM_and_why_does_choosing_it_well_matter\" >What is an SLM and why does choosing it well matter?<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-2\" href=\"https:\/\/amara-marketing.com\/en\/sin-categorizar\/how-to-choose-slm\/#When_does_it_make_sense_to_use_an_SLM_instead_of_an_LLM\" >When does it make sense to use an SLM instead of an LLM?<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-3\" href=\"https:\/\/amara-marketing.com\/en\/sin-categorizar\/how-to-choose-slm\/#What_technical_criteria_should_you_use_to_choose_an_SLM\" >What technical criteria should you use to choose an SLM?<\/a><ul class='ez-toc-list-level-3' ><li class='ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-4\" href=\"https:\/\/amara-marketing.com\/en\/sin-categorizar\/how-to-choose-slm\/#Number_of_parameters_and_hardware_requirements\" >Number of parameters and hardware requirements<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-5\" href=\"https:\/\/amara-marketing.com\/en\/sin-categorizar\/how-to-choose-slm\/#Latency_and_inference\" >Latency and inference<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-6\" href=\"https:\/\/amara-marketing.com\/en\/sin-categorizar\/how-to-choose-slm\/#Accuracy_on_the_specific_task\" >Accuracy on the specific task<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-7\" href=\"https:\/\/amara-marketing.com\/en\/sin-categorizar\/how-to-choose-slm\/#License_and_commercial_use\" >License and commercial use<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-8\" href=\"https:\/\/amara-marketing.com\/en\/sin-categorizar\/how-to-choose-slm\/#Multilingual_support_and_real_quality_in_Spanish\" >Multilingual support and real quality in Spanish<\/a><\/li><\/ul><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-9\" href=\"https:\/\/amara-marketing.com\/en\/sin-categorizar\/how-to-choose-slm\/#What_small_language_models_are_available_today\" >What small language models are available today?<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-10\" href=\"https:\/\/amara-marketing.com\/en\/sin-categorizar\/how-to-choose-slm\/#What_SLM_tools_exist_for_local_deployment\" >What SLM tools exist for local deployment?<\/a><ul class='ez-toc-list-level-3' ><li class='ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-11\" href=\"https:\/\/amara-marketing.com\/en\/sin-categorizar\/how-to-choose-slm\/#Ollama_the_standard_for_local_deployment\" >Ollama: the standard for local deployment<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-12\" href=\"https:\/\/amara-marketing.com\/en\/sin-categorizar\/how-to-choose-slm\/#LM_Studio_visual_interface_for_comparing_models\" >LM Studio: visual interface for comparing models<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-13\" href=\"https:\/\/amara-marketing.com\/en\/sin-categorizar\/how-to-choose-slm\/#llamacpp_and_Hugging_Face_Transformers\" >llama.cpp and Hugging Face Transformers<\/a><\/li><\/ul><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-14\" href=\"https:\/\/amara-marketing.com\/en\/sin-categorizar\/how-to-choose-slm\/#RAG_with_SLM_connect_the_model_to_your_documents_without_retraining_it\" >RAG with SLM: connect the model to your documents without retraining it<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-15\" href=\"https:\/\/amara-marketing.com\/en\/sin-categorizar\/how-to-choose-slm\/#When_to_use_RAG_fine-tuning_or_base_model_Decision_table\" >When to use RAG, fine-tuning or base model? Decision table<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-16\" href=\"https:\/\/amara-marketing.com\/en\/sin-categorizar\/how-to-choose-slm\/#SLM_fine-tuning_when_and_how_to_adjust_the_model_to_your_domain\" >SLM fine-tuning: when and how to adjust the model to your domain<\/a><ul class='ez-toc-list-level-3' ><li class='ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-17\" href=\"https:\/\/amara-marketing.com\/en\/sin-categorizar\/how-to-choose-slm\/#LoRA_and_QLoRA_efficient_fine-tuning_on_modest_hardware\" >LoRA and QLoRA: efficient fine-tuning on modest hardware<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-18\" href=\"https:\/\/amara-marketing.com\/en\/sin-categorizar\/how-to-choose-slm\/#Fine-tuning_tools_Unsloth_and_Axolotl\" >Fine-tuning tools: Unsloth and Axolotl<\/a><\/li><\/ul><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-19\" href=\"https:\/\/amara-marketing.com\/en\/sin-categorizar\/how-to-choose-slm\/#How_to_implement_an_SLM_in_your_project_step_by_step\" >How to implement an SLM in your project step by step?<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-20\" href=\"https:\/\/amara-marketing.com\/en\/sin-categorizar\/how-to-choose-slm\/#SLM_monitoring_in_production_tools_and_metrics\" >SLM monitoring in production: tools and metrics<\/a><ul class='ez-toc-list-level-3' ><li class='ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-21\" href=\"https:\/\/amara-marketing.com\/en\/sin-categorizar\/how-to-choose-slm\/#Traceability_tools_for_LLM\" >Traceability tools for LLM<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-22\" href=\"https:\/\/amara-marketing.com\/en\/sin-categorizar\/how-to-choose-slm\/#Minimum_metrics_to_record\" >Minimum metrics to record<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-23\" href=\"https:\/\/amara-marketing.com\/en\/sin-categorizar\/how-to-choose-slm\/#Minimum_viable_log_without_external_tools\" >Minimum viable log without external tools<\/a><\/li><\/ul><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-24\" href=\"https:\/\/amara-marketing.com\/en\/sin-categorizar\/how-to-choose-slm\/#What_are_the_most_common_mistakes_when_choosing_and_implementing_an_SLM\" >What are the most common mistakes when choosing and implementing an SLM?<\/a><ul class='ez-toc-list-level-3' ><li class='ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-25\" href=\"https:\/\/amara-marketing.com\/en\/sin-categorizar\/how-to-choose-slm\/#Choosing_by_popularity_instead_of_by_fit_to_the_task\" >Choosing by popularity instead of by fit to the task<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-26\" href=\"https:\/\/amara-marketing.com\/en\/sin-categorizar\/how-to-choose-slm\/#Ignoring_the_limitations_of_SLMs\" >Ignoring the limitations of SLMs<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-27\" href=\"https:\/\/amara-marketing.com\/en\/sin-categorizar\/how-to-choose-slm\/#Skipping_the_evaluation_phase\" >Skipping the evaluation phase<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-28\" href=\"https:\/\/amara-marketing.com\/en\/sin-categorizar\/how-to-choose-slm\/#Not_considering_multilingual_support_from_the_start\" >Not considering multilingual support from the start<\/a><\/li><\/ul><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-29\" href=\"https:\/\/amara-marketing.com\/en\/sin-categorizar\/how-to-choose-slm\/#How_does_local_AI_deployment_fit_into_a_business_strategy\" >How does local AI deployment fit into a business strategy?<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-30\" href=\"https:\/\/amara-marketing.com\/en\/sin-categorizar\/how-to-choose-slm\/#Frequently_asked_questions\" >Frequently asked questions<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-31\" href=\"https:\/\/amara-marketing.com\/en\/sin-categorizar\/how-to-choose-slm\/#Sources\" >Sources<\/a><\/li><\/ul><\/nav><\/div>\n\n<aside class=\"nseo-tldr\" style=\"background: #f5f5f5;padding: 16px;border-radius: 4px;margin: 0 0 1.5rem 0\">\n  <strong>Summary:<\/strong> <a title=\"small language models\" href=\"https:\/\/amara-marketing.com\/blog-pymes\/gpt-4o-mini\/\">Small language models<\/a> allow you to run AI locally with low cost and minimal latency. To select the right one, evaluate latency, parameter size, accuracy on your task and license; then deploy it with Ollama or LM Studio. For advanced cases, combine it with RAG or fine-tuning with LoRA\/QLoRA. Monitor in production with Langfuse or Phoenix.<br \/>\n<\/aside>\n<figure class=\"nseo-image nseo-image--featured\"><img decoding=\"async\" src=\"https:\/\/amara-marketing.com\/wp-content\/uploads\/como-elegir-slm.jpg\" alt=\"SLM selection and implementation flow with technical criteria, model architecture and local deployment steps in a real project\" class=\"nseo-image\" loading=\"lazy\"><figcaption>The decision about which small model to choose depends on three pillars: acceptable latency, size compatible with your infrastructure and precision required for your use case.<\/figcaption><\/figure>\n<h2><span class=\"ez-toc-section\" id=\"What_is_an_SLM_and_why_does_choosing_it_well_matter\"><\/span>What is an SLM and why does choosing it well matter?<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p><strong>An SLM is an artificial intelligence model capable of processing and generating natural language with far fewer resources than a conventional LLM.<\/strong> Small language models perform specific tasks with fewer resources, making them the natural option for projects with hardware, privacy or budget constraints. Choosing an SLM appropriately directly determines the viability of the project.<\/p>\n<p>Unlike generalist LLMs, SLMs are usually designed with specific use cases in mind, which allows prioritizing efficiency, speed and control. In well-defined tasks \u2014text classification, data extraction, internal assistants, content moderation\u2014, a well-chosen model can outperform in practical terms a large one that is poorly adjusted. That is why knowing how to choose an SLM with criteria is as valuable as knowing how to deploy it.<\/p>\n<p>The ecosystem of <strong>small language models<\/strong> has grown enormously. Hugging Face has surpassed 2 million public models. Choosing an SLM poorly means wasted time, oversized infrastructure or mediocre results. Choosing an SLM well can make the difference between a viable project and one that never reaches production.<\/p>\n<h2><span class=\"ez-toc-section\" id=\"When_does_it_make_sense_to_use_an_SLM_instead_of_an_LLM\"><\/span>When does it make sense to use an SLM instead of an LLM?<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>Before getting into selection criteria, it is worth being clear about when a small model is the right answer. Choosing an SLM is the correct decision when one or more of these conditions are met:<\/p>\n<ul>\n<li><strong>Data privacy:<\/strong> you need data not to leave your infrastructure.<\/li>\n<li><strong>Critical latency:<\/strong> your application requires real-time or near-real-time responses.<\/li>\n<li><strong>Limited budget:<\/strong> calls to large model APIs are too costly at scale.<\/li>\n<li><strong>Bounded task:<\/strong> the model only needs to do one thing well, not everything.<\/li>\n<li><strong>Edge deployment:<\/strong> the model will run on a device with limited resources.<\/li>\n<\/ul>\n<p>On the other hand, if your case requires complex reasoning, open creative generation or handling multiple domains simultaneously, an LLM remains the most robust option. In that case, choosing an SLM might not be sufficient.<\/p>\n<h2><span class=\"ez-toc-section\" id=\"What_technical_criteria_should_you_use_to_choose_an_SLM\"><\/span>What technical criteria should you use to choose an SLM?<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>Making this decision rigorously requires evaluating at least five technical dimensions before downloading any model. Each criterion directly influences whether the SLM choice will be correct or not.<\/p>\n<h3><span class=\"ez-toc-section\" id=\"Number_of_parameters_and_hardware_requirements\"><\/span>Number of parameters and hardware requirements<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p>The size of the model \u2014measured in billions of parameters (B)\u2014 directly determines how much memory you need. For hardware with 8 GB of VRAM, Phi-4-mini (3.8 B) is the best compact reasoner with approximately 3 GB of VRAM in Q4 quantization, and Gemma 3 4B is the best option if you need multimodal capabilities or support for more than 140 languages. This data is essential for choosing an SLM that fits your real infrastructure.<\/p>\n<p>As a general rule: models of 1-4 B parameters work on laptops with 8 GB of RAM; models of 7-14 B require a dedicated GPU or at least 16 GB of unified RAM. <strong>Do not choose the largest model that can run on your hardware; choose the smallest one that solves your task with sufficient quality.<\/strong> This principle is fundamental when choosing an SLM for any production environment.<\/p>\n<h3><span class=\"ez-toc-section\" id=\"Latency_and_inference\"><\/span>Latency and inference<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p>Latency \u2014the time it takes the model to generate a response\u2014 depends on the model size, the hardware and the level of quantization applied. Quantization converts high-precision data to lower precision, which lightens the computational load and speeds up inference. <strong>Evaluating real latency on your hardware is an essential step<\/strong> before committing to a model in production. Ignoring this point is one of the most common mistakes when choosing an SLM.<\/p>\n<p>For interactive applications, aim for models that generate at least 20-30 tokens per second on your hardware. Tools like Ollama show you this metric directly during inference, making it easy to compare candidates when you need to choose an SLM with strict speed requirements.<\/p>\n<h3><span class=\"ez-toc-section\" id=\"Accuracy_on_the_specific_task\"><\/span>Accuracy on the specific task<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p><strong>General benchmarks are indicative, but real accuracy is what you get on your specific task.<\/strong> A model with a high MMLU score may perform worse than a smaller one in, for example, entity extraction from legal documents in Spanish. This nuance is critical for choosing an SLM objectively.<\/p>\n<p>The practical recommendation: <strong>define a set of 20-50 representative examples of your use case<\/strong> and evaluate each candidate model on them before making the final decision. This is more valuable than any benchmark table and is the most reliable method for choosing an SLM with guarantees.<\/p>\n<h3><span class=\"ez-toc-section\" id=\"License_and_commercial_use\"><\/span>License and commercial use<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p>Not all small language models are free for commercial use. Before integrating an SLM into a product, verify its license. This step is essential when choosing an SLM for a business environment. Qwen 3 SLM models are available under the Apache 2.0 license, and are free to download, fine-tune and use commercially. Other models, such as those in the Gemma family, have their own licenses that allow commercial use under certain conditions.<\/p>\n<p><strong>Always review the license before building on a model.<\/strong> A subsequent license change can force you to migrate your entire implementation. Taking this into account from the start greatly simplifies choosing an SLM with legal guarantees.<\/p>\n<h3><span class=\"ez-toc-section\" id=\"Multilingual_support_and_real_quality_in_Spanish\"><\/span>Multilingual support and real quality in Spanish<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p>If your project operates in Spanish or other languages other than English, multilingual support is a critical criterion when choosing an SLM. Some models like Qwen 3 support more than 100 languages and dialects. Models trained primarily in English <strong>can notably degrade their quality in Spanish<\/strong>.<\/p>\n<p>To illustrate the difference, consider this information extraction prompt in Spanish: <em>&#8220;Extract the customer name, amount and due date from this invoice: &#8216;Customer: Distribuciones L\u00f3pez S.L. Amount: 3,450.00 \u20ac Due date: 15\/02\/2026.'&#8221;<\/em><\/p>\n<p>With <strong>Qwen 3 4B<\/strong>, the output is structured and precise. With a model without real multilingual support, the typical response mixes languages, omits the currency symbol or reformats the date to the Anglo-Saxon standard. <strong>Always test with examples in the production language<\/strong>: public benchmarks are usually measured in English and do not reflect real quality in Spanish. This step is especially relevant when choosing an SLM for Spanish-speaking projects.<\/p>\n<h2><span class=\"ez-toc-section\" id=\"What_small_language_models_are_available_today\"><\/span>What small language models are available today?<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<figure class=\"nseo-image nseo-image--inline-1\"><img decoding=\"async\" src=\"https:\/\/amara-marketing.com\/wp-content\/uploads\/como-elegir-slm-que-modelos-de-lenguaje-pequenos-estan-disponibles-hoy.jpg\" alt=\"Visual comparison of available small language models with parameters, memory consumption and inference speed\" class=\"nseo-image\" loading=\"lazy\"><figcaption>Popular models range from 3 billion parameters (very fast, less accurate) to 14 billion (more accurate, higher latency), allowing you to choose according to your balance of resources and quality.<\/figcaption><\/figure>\n<p>The ecosystem of <strong>small language models<\/strong> has matured rapidly. Knowing the available catalog is indispensable for choosing an SLM in an informed way. These are the most relevant ones in 2025-2026:<\/p>\n<table class=\"nseo-comparison\" style=\"border-collapse: collapse;width: 100%;margin: 1.5rem 0\">\n<caption style=\"caption-side: top;text-align: left;font-weight: 600;padding: 8px 0\">Comparison of popular SLMs for local deployment<\/caption>\n<thead>\n<tr>\n<th scope=\"col\" style=\"border: 1px solid #ddd;padding: 8px 12px;background: #f5f5f5;text-align: left\">Model<\/th>\n<th scope=\"col\" style=\"border: 1px solid #ddd;padding: 8px 12px;background: #f5f5f5;text-align: left\">Parameters<\/th>\n<th scope=\"col\" style=\"border: 1px solid #ddd;padding: 8px 12px;background: #f5f5f5;text-align: left\">Strength<\/th>\n<th scope=\"col\" style=\"border: 1px solid #ddd;padding: 8px 12px;background: #f5f5f5;text-align: left\">License<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td style=\"border: 1px solid #ddd;padding: 8px 12px\">Phi-4-mini<\/td>\n<td style=\"border: 1px solid #ddd;padding: 8px 12px\">3.8 B<\/td>\n<td style=\"border: 1px solid #ddd;padding: 8px 12px\">Compact reasoning, low consumption<\/td>\n<td style=\"border: 1px solid #ddd;padding: 8px 12px\">MIT<\/td>\n<\/tr>\n<tr>\n<td style=\"border: 1px solid #ddd;padding: 8px 12px\">Gemma 3 4B<\/td>\n<td style=\"border: 1px solid #ddd;padding: 8px 12px\">4 B<\/td>\n<td style=\"border: 1px solid #ddd;padding: 8px 12px\">Multimodal, 140+ languages<\/td>\n<td style=\"border: 1px solid #ddd;padding: 8px 12px\">Gemma (commercial allowed)<\/td>\n<\/tr>\n<tr>\n<td style=\"border: 1px solid #ddd;padding: 8px 12px\">Llama 3.2 3B<\/td>\n<td style=\"border: 1px solid #ddd;padding: 8px 12px\">3 B<\/td>\n<td style=\"border: 1px solid #ddd;padding: 8px 12px\">Performance\/size balance<\/td>\n<td style=\"border: 1px solid #ddd;padding: 8px 12px\">Llama 3 Community<\/td>\n<\/tr>\n<tr>\n<td style=\"border: 1px solid #ddd;padding: 8px 12px\">Qwen 3 4B<\/td>\n<td style=\"border: 1px solid #ddd;padding: 8px 12px\">4 B<\/td>\n<td style=\"border: 1px solid #ddd;padding: 8px 12px\">Multilingual, coding, reasoning<\/td>\n<td style=\"border: 1px solid #ddd;padding: 8px 12px\">Apache 2.0<\/td>\n<\/tr>\n<tr>\n<td style=\"border: 1px solid #ddd;padding: 8px 12px\">Mistral 7B<\/td>\n<td style=\"border: 1px solid #ddd;padding: 8px 12px\">7 B<\/td>\n<td style=\"border: 1px solid #ddd;padding: 8px 12px\">Instructions, general use<\/td>\n<td style=\"border: 1px solid #ddd;padding: 8px 12px\">Apache 2.0<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>Phi-4 (14 B) is the reference SLM in general benchmarks \u201484.8% on MMLU, surpassing GPT-4o in mathematics\u2014 and fits in a 12 GB GPU. However, for projects with more limited hardware, <strong>3-4 B models are the most pragmatic starting point<\/strong> for choosing an SLM without oversizing the infrastructure.<\/p>\n<h2><span class=\"ez-toc-section\" id=\"What_SLM_tools_exist_for_local_deployment\"><\/span>What SLM tools exist for local deployment?<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>The <strong>tools for local SLM deployment<\/strong> have matured to the point where any developer can have a model running in minutes. Choosing an SLM correctly also involves choosing the right deployment tool.<\/p>\n<h3><span class=\"ez-toc-section\" id=\"Ollama_the_standard_for_local_deployment\"><\/span>Ollama: the standard for local deployment<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p>Ollama has become the de facto standard for local language model management due to its simplicity: it manages model weights, environment configuration and the API server in a single package. It is one of the first tools you should consider when choosing an SLM for development environments.<\/p>\n<p>Its most practical advantage is automatic integration: Ollama automatically creates a local server at <em>localhost:11434<\/em>, which allows integrating the model into Python or JavaScript applications with ease. Furthermore, <strong>Ollama allows running models without an internet connection<\/strong>, which helps protect sensitive data. You can consult the <a href=\"https:\/\/ollama.com\/blog\" target=\"_blank\" rel=\"noopener\">official Ollama documentation<\/a> to see the supported models.<\/p>\n<h3><span class=\"ez-toc-section\" id=\"LM_Studio_visual_interface_for_comparing_models\"><\/span>LM Studio: visual interface for comparing models<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p>LM Studio provides a graphical interface for users who want to compare different models from Hugging Face; it allows viewing resource usage (CPU\/RAM) in real time and selecting specific quantization levels. It is especially useful in the evaluation phase, when you are still trying to choose an SLM among several candidates.<\/p>\n<p>LM Studio became free for commercial use in July 2025. <strong>If you are new to the small model ecosystem, LM Studio is the most user-friendly entry point<\/strong> for choosing an SLM without prior experience.<\/p>\n<h3><span class=\"ez-toc-section\" id=\"llamacpp_and_Hugging_Face_Transformers\"><\/span>llama.cpp and Hugging Face Transformers<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p>For developers who need greater control, llama.cpp is especially efficient for running quantized models natively. Ollama runs llama.cpp internally, so using it directly gives you access to more configuration options in exchange for greater complexity. This option is suitable when you need to choose an SLM and fine-tune the inference parameters to the maximum.<\/p>\n<p>Hugging Face Transformers offers a wider range of models and tasks. It is the natural option if you already work with the Python machine learning ecosystem and want to integrate an SLM into an existing <strong>data pipeline<\/strong>. Choosing an SLM through Transformers gives access to the largest available model repository.<\/p>\n<h2><span class=\"ez-toc-section\" id=\"RAG_with_SLM_connect_the_model_to_your_documents_without_retraining_it\"><\/span>RAG with SLM: connect the model to your documents without retraining it<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>RAG (Retrieval-Augmented Generation) is the most common architectural pattern for extending the capabilities of an SLM without modifying its weights. <strong>The central idea is simple: instead of retraining the model with your data, you provide relevant context in each query<\/strong>, retrieved in real time from your own knowledge base. Choosing an SLM compatible with this pattern greatly expands its usefulness.<\/p>\n<p>The basic flow of a RAG architecture with a local SLM has three steps:<\/p>\n<ol>\n<li><strong>Indexing:<\/strong> your documents are divided into fragments and converted into numerical vectors using an embeddings model. These vectors are stored in a vector database such as ChromaDB or Qdrant.<\/li>\n<li><strong>Retrieval:<\/strong> when the user asks a question, the system converts the question into a vector and searches for the most similar fragments in the database.<\/li>\n<li><strong>Generation:<\/strong> the SLM receives the original question together with the retrieved fragments and generates a response grounded in that specific information.<\/li>\n<\/ol>\n<p>To implement this pattern with a local model, the two most widely used frameworks are <a href=\"https:\/\/www.llamaindex.ai\/\" target=\"_blank\" rel=\"noopener\">LlamaIndex<\/a> and <a href=\"https:\/\/www.langchain.com\/\" target=\"_blank\" rel=\"noopener\">LangChain<\/a>. LangChain excels at orchestrating multi-step AI workflows, while LlamaIndex focuses on optimizing document indexing and retrieval. Both make it easier to choose an SLM and connect it to your internal data sources.<\/p>\n<p><strong>When to use RAG instead of fine-tuning?<\/strong> RAG is the right option when your data changes frequently or when you need the model to cite specific sources. Fine-tuning is more appropriate when you want to modify the model&#8217;s response style or specialize its behavior in a static domain. This distinction also influences how to choose the base SLM for each case.<\/p>\n<h2><span class=\"ez-toc-section\" id=\"When_to_use_RAG_fine-tuning_or_base_model_Decision_table\"><\/span>When to use RAG, fine-tuning or base model? Decision table<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<table class=\"nseo-comparison\" style=\"border-collapse: collapse;width: 100%;margin: 1.5rem 0\">\n<caption style=\"caption-side: top;text-align: left;font-weight: 600;padding: 8px 0\">Decision matrix: base model vs. RAG vs. fine-tuning<\/caption>\n<thead>\n<tr>\n<th scope=\"col\" style=\"border: 1px solid #ddd;padding: 8px 12px;background: #f5f5f5;text-align: left\">Situation<\/th>\n<th scope=\"col\" style=\"border: 1px solid #ddd;padding: 8px 12px;background: #f5f5f5;text-align: left\">Recommendation<\/th>\n<th scope=\"col\" style=\"border: 1px solid #ddd;padding: 8px 12px;background: #f5f5f5;text-align: left\">Reason<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td style=\"border: 1px solid #ddd;padding: 8px 12px\">The task is well covered by the pre-trained model<\/td>\n<td style=\"border: 1px solid #ddd;padding: 8px 12px\"><strong>Base model<\/strong><\/td>\n<td style=\"border: 1px solid #ddd;padding: 8px 12px\">Lower complexity, zero adaptation cost<\/td>\n<\/tr>\n<tr>\n<td style=\"border: 1px solid #ddd;padding: 8px 12px\">You need answers about your own documents or changing data<\/td>\n<td style=\"border: 1px solid #ddd;padding: 8px 12px\"><strong>RAG<\/strong><\/td>\n<td style=\"border: 1px solid #ddd;padding: 8px 12px\">No retraining; updatable in real time<\/td>\n<\/tr>\n<tr>\n<td style=\"border: 1px solid #ddd;padding: 8px 12px\">You need brand tone, proprietary categories or very specific behavior<\/td>\n<td style=\"border: 1px solid #ddd;padding: 8px 12px\"><strong>Fine-tuning<\/strong><\/td>\n<td style=\"border: 1px solid #ddd;padding: 8px 12px\">The model internalizes the style and patterns of the domain<\/td>\n<\/tr>\n<tr>\n<td style=\"border: 1px solid #ddd;padding: 8px 12px\">Static domain + specific tone + own data<\/td>\n<td style=\"border: 1px solid #ddd;padding: 8px 12px\"><strong>Fine-tuning + RAG<\/strong><\/td>\n<td style=\"border: 1px solid #ddd;padding: 8px 12px\">Optimal combination for maximum performance in a closed domain<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>This table is a quick guide for choosing an SLM with the correct adaptation strategy according to your specific situation.<\/p>\n<h2><span class=\"ez-toc-section\" id=\"SLM_fine-tuning_when_and_how_to_adjust_the_model_to_your_domain\"><\/span>SLM fine-tuning: when and how to adjust the model to your domain<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>Fine-tuning consists of continuing the training of a pre-trained SLM with your own domain data, so that the model internalizes the vocabulary, style and specific patterns of your use case. <strong>It is the right option when RAG is not enough<\/strong>: for example, when you need the model to adopt a very specific brand tone or classify according to proprietary categories. Before applying it, it is important to choose a base SLM that is compatible with the adjustment techniques you plan to use.<\/p>\n<h3><span class=\"ez-toc-section\" id=\"LoRA_and_QLoRA_efficient_fine-tuning_on_modest_hardware\"><\/span>LoRA and QLoRA: efficient fine-tuning on modest hardware<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p>Full retraining of an SLM requires prohibitive computing resources. Low-rank adaptation techniques (LoRA and QLoRA) solve this problem: <strong>instead of updating all the model&#8217;s parameters, only additional low-rank matrices are trained<\/strong> that are added to the original, frozen weights. The original LoRA paper (<a href=\"https:\/\/arxiv.org\/abs\/2106.09685\" target=\"_blank\" rel=\"noopener\">Hu et al., 2021<\/a>) demonstrated that this technique can match the performance of full fine-tuning with up to 10,000\u00d7 fewer trainable parameters. This makes choosing an SLM for fine-tuning with LoRA accessible even with modest hardware.<\/p>\n<p>QLoRA takes this a step further by combining 4-bit quantization with LoRA. With QLoRA it is possible to fine-tune 3B parameter models using only 8 GB of VRAM. Choosing an SLM compatible with QLoRA significantly expands the fine-tuning options on consumer hardware.<\/p>\n<h3><span class=\"ez-toc-section\" id=\"Fine-tuning_tools_Unsloth_and_Axolotl\"><\/span>Fine-tuning tools: Unsloth and Axolotl<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p>Two tools stand out today as the most accessible for fine-tuning SLMs on consumer hardware:<\/p>\n<ul>\n<li><strong>Unsloth:<\/strong> uses custom CUDA\/Triton kernels that accelerate fine-tuning with LoRA and QLoRA up to 5\u00d7 while reducing memory usage. It is the fastest option for a single GPU. However, it does not support multi-GPU training.<\/li>\n<li><strong>Axolotl:<\/strong> community-oriented for LLM fine-tuning, with YAML-based configurations and extensive integration with Hugging Face libraries. It is the natural option for multi-GPU environments.<\/li>\n<\/ul>\n<p>The minimum process for fine-tuning with Unsloth is: prepare a dataset in JSONL format with instruction-response pairs, configure the LoRA parameters, launch the training and export the resulting adapter. <strong>With 500-2000 quality examples<\/strong>, an SLM of 3-4 B can specialize notably in a specific task. Choosing an SLM of the right size is the first step before starting any fine-tuning process.<\/p>\n<h2><span class=\"ez-toc-section\" id=\"How_to_implement_an_SLM_in_your_project_step_by_step\"><\/span>How to implement an SLM in your project step by step?<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p><strong>Implementing an SLM in a real project always follows the same process<\/strong>, regardless of the model or tool you choose. These steps also serve as a guide for choosing an SLM with methodological rigor.<\/p>\n<ol>\n<li><strong>Define the task precisely.<\/strong> Write in one sentence what the SLM must do: &#8220;classify support tickets into 5 categories&#8221;, &#8220;summarize contracts in less than 100 words&#8221;. The more bounded the task, the easier it will be to choose the right SLM and implement it.<\/li>\n<li><strong>Evaluate your available hardware.<\/strong> Check the available RAM, whether you have a dedicated GPU and how much VRAM it has. This will determine the range of model sizes you can run and will significantly narrow down how to choose a viable SLM.<\/li>\n<li><strong>Select 2-3 candidate models.<\/strong> Using the criteria described above, choose a small set of candidates. For projects in Spanish, Qwen 3 4B, Gemma 3 4B and Llama 3.2 3B are a good starting point for choosing an SLM with multilingual support.<\/li>\n<li><strong>Install Ollama and download the candidate models.<\/strong> Once installed, download the models with commands like <em>ollama pull qwen3:4b<\/em>. It is the fastest method for choosing an SLM and testing it locally.<\/li>\n<li><strong>Evaluate with real data.<\/strong> Prepare a set of 20-50 examples of your use case and run each candidate model. Measure accuracy, latency and subjective quality. This evaluation is the objective basis for choosing the definitive SLM.<\/li>\n<li><strong>Apply quantization if necessary.<\/strong> If the chosen model is too slow, try a quantized version (Q4 or Q8). Quantization allows choosing larger SLMs without exceeding your hardware limits.<\/li>\n<li><strong>Integrate via local API.<\/strong> Once the choice is confirmed, integrate it into your application through the local endpoint that Ollama exposes:<\/li>\n<\/ol>\n<p><strong>Option A \u2014 official Ollama library for Python:<\/strong><\/p>\n<p># pip install ollama<br \/>\nimport ollama<\/p>\n<p>response = ollama.chat(<br \/>\n    model=&#8221;qwen3:4b&#8221;,<br \/>\n    messages=[<br \/>\n        {<br \/>\n            &#8220;role&#8221;: &#8220;user&#8221;,<br \/>\n            &#8220;content&#8221;: &#8220;Classify this ticket into one of these categories: Billing, Technical support, Shipping, Other. Ticket: &#8216;My order 12345 has not arrived.'&#8221;<br \/>\n        }<br \/>\n    ]<br \/>\n)<\/p>\n<p>print(response[&#8220;message&#8221;][&#8220;content&#8221;])<\/p>\n<p><strong>Option B \u2014 direct HTTP call with requests:<\/strong><\/p>\n<p>import requests, json<\/p>\n<p>payload = {<br \/>\n    &#8220;model&#8221;: &#8220;qwen3:4b&#8221;,<br \/>\n    &#8220;messages&#8221;: [<br \/>\n        {<br \/>\n            &#8220;role&#8221;: &#8220;user&#8221;,<br \/>\n            &#8220;content&#8221;: &#8220;Classify this ticket into one of these categories: Billing, Technical support, Shipping, Other. Ticket: &#8216;My order 12345 has not arrived.'&#8221;<br \/>\n        }<br \/>\n    ],<br \/>\n    &#8220;stream&#8221;: False<br \/>\n}<\/p>\n<p>resp = requests.post(&#8220;http:\/\/localhost:11434\/api\/chat&#8221;, json=payload)<br \/>\ndata = resp.json()<br \/>\nprint(data[&#8220;message&#8221;][&#8220;content&#8221;])<\/p>\n<ol>\n<li><strong>Consider RAG or fine-tuning if base performance is not sufficient.<\/strong> If the model responds well in general but does not know your own data, implement a RAG pipeline. If you need to change the behavior or style of the model, consider fine-tuning with LoRA\/QLoRA. In both cases, choosing a base SLM compatible with these techniques greatly facilitates integration.<\/li>\n<li><strong>Monitor and adjust.<\/strong> In production, systematic tracking is what separates a prototype from a reliable system. Choosing an SLM with good documentation and an active community facilitates problem resolution in this phase.<\/li>\n<\/ol>\n<aside class=\"nseo-callout nseo-callout--consejo\" style=\"background: #eff6ff;border-left: 4px solid #2563eb;padding: 12px 16px;margin: 1rem 0\">\n  <strong>Tip:<\/strong> Always start with the smallest model you think can solve your task. It is easier to scale up if performance is not sufficient than to optimize an oversized model. If the base model does not reach the mark, add RAG before resorting to fine-tuning: it is faster to implement and easier to maintain. This sequence also simplifies how to choose an SLM in subsequent iterations.<br \/>\n<\/aside>\n<h2><span class=\"ez-toc-section\" id=\"SLM_monitoring_in_production_tools_and_metrics\"><\/span>SLM monitoring in production: tools and metrics<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>The monitoring step is the most undervalued of the entire implementation. <strong>Without observability, you cannot know when the model fails, why it fails or how to improve it.<\/strong> Choosing an appropriate SLM for production includes considering from the outset how you are going to monitor it.<\/p>\n<h3><span class=\"ez-toc-section\" id=\"Traceability_tools_for_LLM\"><\/span>Traceability tools for LLM<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p>Two tools stand out as the standard for observability of language model-based systems:<\/p>\n<ul>\n<li><strong>Langfuse:<\/strong> open-source traceability platform for LLMs that records each model call with its prompt, response, latency and estimated cost. It integrates with LangChain, LlamaIndex and direct API calls. <strong>It is the most recommended option for small teams<\/strong> that need quick visibility without complex infrastructure. It is especially useful when you have had to choose an SLM without prior experience in observability.<\/li>\n<li><strong>Phoenix (Arize):<\/strong> open-source tool focused on evaluation and debugging of RAG and LLM pipelines. Especially useful when you have a RAG pipeline and want to understand which fragments are retrieved and how they affect response quality. Choosing an SLM with active community support facilitates its integration with Phoenix.<\/li>\n<\/ul>\n<h3><span class=\"ez-toc-section\" id=\"Minimum_metrics_to_record\"><\/span>Minimum metrics to record<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p>Regardless of the tool you use, these are the metrics you should record from the first day in production:<\/p>\n<ul>\n<li><strong>p50 and p95 latency:<\/strong> the median tells you typical performance; the 95th percentile tells you how long slow calls take. <strong>A p95 above 5 seconds is usually unacceptable<\/strong> in interactive applications. If you detect this problem, it may be a sign that you should choose a lighter SLM or apply more quantization.<\/li>\n<li><strong>Error rate:<\/strong> percentage of calls that return an error or an empty response. A rate above 1% in production requires immediate investigation.<\/li>\n<li><strong>Response length:<\/strong> responses that are systematically shorter or longer than expected indicate problems with the prompt or the configured temperature.<\/li>\n<li><strong>Rejection or hallucination rate:<\/strong> in extraction or classification tasks, measure how many responses do not follow the expected format. A sustained increase may indicate that it is worth choosing an SLM with a better fit to your task.<\/li>\n<\/ul>\n<h3><span class=\"ez-toc-section\" id=\"Minimum_viable_log_without_external_tools\"><\/span>Minimum viable log without external tools<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p>If you cannot integrate Langfuse or Phoenix immediately, this is the minimum log you should implement in Python to have basic visibility:<\/p>\n<p>import time, json, logging<\/p>\n<p>logging.basicConfig(filename=&#8221;slm_production.log&#8221;, level=logging.INFO)<\/p>\n<p>def call_model_with_log(prompt: str, model: str = &#8220;qwen3:4b&#8221;) -&gt; str:<br \/>\n    import requests<br \/>\n    start = time.time()<br \/>\n    try:<br \/>\n        resp = requests.post(<br \/>\n            &#8220;http:\/\/localhost:11434\/api\/chat&#8221;,<br \/>\n            json={&#8220;model&#8221;: model, &#8220;messages&#8221;: [{&#8220;role&#8221;: &#8220;user&#8221;, &#8220;content&#8221;: prompt}], &#8220;stream&#8221;: False},<br \/>\n            timeout=30<br \/>\n        )<br \/>\n        latency_ms = (time.time() &#8211; start) * 1000<br \/>\n        output = resp.json()[&#8220;message&#8221;][&#8220;content&#8221;]<br \/>\n        logging.info(json.dumps({<br \/>\n            &#8220;model&#8221;: model,<br \/>\n            &#8220;latency_ms&#8221;: round(latency_ms, 1),<br \/>\n            &#8220;prompt_len&#8221;: len(prompt),<br \/>\n            &#8220;response_len&#8221;: len(output),<br \/>\n            &#8220;status&#8221;: &#8220;ok&#8221;<br \/>\n        }))<br \/>\n        return output<br \/>\n    except Exception as e:<br \/>\n        latency_ms = (time.time() &#8211; start) * 1000<br \/>\n        logging.error(json.dumps({&#8220;model&#8221;: model, &#8220;latency_ms&#8221;: round(latency_ms, 1), &#8220;status&#8221;: &#8220;error&#8221;, &#8220;error&#8221;: str(e)}))<br \/>\n        raise<\/p>\n<p>This log in JSONL format is directly importable into any analysis tool and allows you to detect performance degradations without depending on external platforms. It is valid regardless of the SLM you have chosen.<\/p>\n<h2><span class=\"ez-toc-section\" id=\"What_are_the_most_common_mistakes_when_choosing_and_implementing_an_SLM\"><\/span>What are the most common mistakes when choosing and implementing an SLM?<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<figure class=\"nseo-image nseo-image--inline-2\"><img decoding=\"async\" src=\"https:\/\/amara-marketing.com\/wp-content\/uploads\/como-elegir-slm-cuales-son-los-errores-mas-comunes-al-elegir-e-implementar-un-sl.jpg\" alt=\"Common mistakes in SLM selection: excessive sizing, ignoring latency, inadequate infrastructure, insufficient testing\" class=\"nseo-image\" loading=\"lazy\"><figcaption>Choosing a model that is too large for your available hardware is the most costly mistake; many developers underestimate the importance of validating latency before moving to production.<\/figcaption><\/figure>\n<p>Knowing the common mistakes saves you weeks of work. These are the most frequent ones when working with <strong>small language models<\/strong> for the first time and trying to choose an SLM without a clear methodology.<\/p>\n<h3><span class=\"ez-toc-section\" id=\"Choosing_by_popularity_instead_of_by_fit_to_the_task\"><\/span>Choosing by popularity instead of by fit to the task<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p>The most downloaded model is not necessarily the best for your case. <strong>Always evaluate on your own data before committing.<\/strong> Selecting by popularity without empirical validation is one of the most frequent and most avoidable mistakes when choosing an SLM. Popularity is an indicator of community, not of suitability for your specific task.<\/p>\n<h3><span class=\"ez-toc-section\" id=\"Ignoring_the_limitations_of_SLMs\"><\/span>Ignoring the limitations of SLMs<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p>Limited processing capacity can lead to reduced accuracy in tasks involving multi-factor reasoning or high levels of abstraction; therefore, <strong>they may not be the best option for applications that require high accuracy<\/strong>, such as scientific research or medical diagnosis. Knowing these limitations is an essential part of knowing how to choose an SLM correctly.<\/p>\n<h3><span class=\"ez-toc-section\" id=\"Skipping_the_evaluation_phase\"><\/span>Skipping the evaluation phase<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p>Many teams install the first model they find and integrate it directly into production. <strong>The evaluation phase with real data is the most profitable investment in the process<\/strong>: it detects problems before they reach users and allows choosing an SLM objectively among the available options.<\/p>\n<h3><span class=\"ez-toc-section\" id=\"Not_considering_multilingual_support_from_the_start\"><\/span>Not considering multilingual support from the start<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p>If your project operates in Spanish, verifying multilingual support from the beginning is critical. Some models notably degrade their quality in Spanish. <strong>Always test with examples in the production language<\/strong>, not in English. Overlooking this point when choosing an SLM can ruin the end-user experience even with a technically solid model in English.<\/p>\n<aside class=\"nseo-callout nseo-callout--importante\" style=\"background: #eff6ff;border-left: 4px solid #2563eb;padding: 12px 16px;margin: 1rem 0\">\n  <strong>Important:<\/strong> Local AI deployment solves many privacy problems, but it also means that you are responsible for the infrastructure, updates and security of the model. Protect the Ollama endpoint with authentication or isolate it on an internal network. Manage model versions the same way you manage code versions.<br \/>\n<\/aside>\n<h2><span class=\"ez-toc-section\" id=\"How_does_local_AI_deployment_fit_into_a_business_strategy\"><\/span>How does local AI deployment fit into a business strategy?<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p><strong>Local AI deployment<\/strong> with small models is not just a technical decision: it is also a strategic decision. Choosing your own SLM allows SMEs and entrepreneurs to have AI capabilities without depending on external providers, without variable per-call costs and without handing over customer data to third parties.<\/p>\n<p>To illustrate the economic argument, this indicative estimate compares the cost of an external API versus own infrastructure for a volume of 1 million inferences per month:<\/p>\n<table class=\"nseo-comparison\" style=\"border-collapse: collapse;width: 100%;margin: 1.5rem 0\">\n<caption style=\"caption-side: top;text-align: left;font-weight: 600;padding: 8px 0\">Cost estimate: external API vs. local SLM (1M inferences\/month, ~500 token prompts)<\/caption>\n<thead>\n<tr>\n<th scope=\"col\" style=\"border: 1px solid #ddd;padding: 8px 12px;background: #f5f5f5;text-align: left\">Scenario<\/th>\n<th scope=\"col\" style=\"border: 1px solid #ddd;padding: 8px 12px;background: #f5f5f5;text-align: left\">Estimated cost\/month<\/th>\n<th scope=\"col\" style=\"border: 1px solid #ddd;padding: 8px 12px;background: #f5f5f5;text-align: left\">Privacy<\/th>\n<th scope=\"col\" style=\"border: 1px solid #ddd;padding: 8px 12px;background: #f5f5f5;text-align: left\">Latency<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td style=\"border: 1px solid #ddd;padding: 8px 12px\">GPT-4o mini API<\/td>\n<td style=\"border: 1px solid #ddd;padding: 8px 12px\">~\u20ac150-300<\/td>\n<td style=\"border: 1px solid #ddd;padding: 8px 12px\">Data at external provider<\/td>\n<td style=\"border: 1px solid #ddd;padding: 8px 12px\">Variable (network)<\/td>\n<\/tr>\n<tr>\n<td style=\"border: 1px solid #ddd;padding: 8px 12px\">Local SLM (Qwen 3 4B, own server)<\/td>\n<td style=\"border: 1px solid #ddd;padding: 8px 12px\">~\u20ac20-40 (electricity + amortization)<\/td>\n<td style=\"border: 1px solid #ddd;padding: 8px 12px\">Data in your infrastructure<\/td>\n<td style=\"border: 1px solid #ddd;padding: 8px 12px\">Low and predictable<\/td>\n<\/tr>\n<tr>\n<td style=\"border: 1px solid #ddd;padding: 8px 12px\">SLM on cloud VPS (shared GPU)<\/td>\n<td style=\"border: 1px solid #ddd;padding: 8px 12px\">~\u20ac60-100<\/td>\n<td style=\"border: 1px solid #ddd;padding: 8px 12px\">Data on your VPS<\/td>\n<td style=\"border: 1px solid #ddd;padding: 8px 12px\">Medium-low<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>The key point is not the exact number, but the cost structure: <strong>with external APIs you pay per inference; with your own SLM, the cost is fixed and scales without marginal cost<\/strong>. Beyond a certain volume, the local model is more economical and more secure. Choosing a local SLM over an external API is, at that scale, as important a business decision as a technical one.<\/p>\n<p>The most immediate use cases for marketing and business teams include: automatic lead classification, sentiment analysis in reviews, generation of internal content drafts, or customer service assistants that run entirely on your own infrastructure. <strong>The key is to start with a bounded task, measure it and scale only when the value is proven.<\/strong> Choosing the right SLM for that first use case is the starting point of any sustainable local AI strategy.<\/p>\n<section class=\"nseo-faq\">\n<h2><span class=\"ez-toc-section\" id=\"Frequently_asked_questions\"><\/span>Frequently asked questions<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<details>\n<summary>How much RAM do I need to run an SLM locally?<\/summary>\n<p>It depends on the model size. For 3-4 B parameter models with Q4 quantization, 8 GB of RAM is sufficient on a modern laptop without a dedicated GPU. For 7 B models, it is recommended to have at least 16 GB of RAM or a GPU with 8 GB of VRAM. Tools like LM Studio show you consumption in real time before confirming the choice, which greatly facilitates knowing how to choose an SLM that fits your hardware.<\/p>\n<\/details>\n<details>\n<summary>What is the difference between Ollama and LM Studio for implementing an SLM?<\/summary>\n<p>Ollama is developer-oriented: it manages models from the command line and exposes a local API that you can consume from any application. LM Studio offers a more visual graphical interface, ideal for comparing models and exploring options without writing code. For production, Ollama is the most common option; for evaluation and experimentation, LM Studio is more comfortable. Both tools are complementary and useful in different phases of the implementation process. Choosing an SLM with one or the other depends on the stage of the project and the team&#8217;s profile.<\/p>\n<\/details>\n<details>\n<summary>Can I use an SLM in Spanish with good quality?<\/summary>\n<p>Yes, but you must choose a model with real multilingual support; this is one of the most important considerations when choosing an SLM for projects in Spanish. Qwen 3 and Gemma 3 are the most solid options for Spanish in the small model range. Always verify performance with examples in Spanish before deciding, as benchmarks are usually measured in English and do not necessarily reflect quality in other languages.<\/p>\n<\/details>\n<details>\n<summary>How do I monitor an SLM in production without complex tools?<\/summary>\n<p>The most accessible starting point is a structured log in JSONL format that records latency, prompt and response length, and the status of each call. With that log you can detect performance degradations in any analysis tool. When volume grows, Langfuse (open-source) is the most recommended option for complete LLM traceability without complex infrastructure; Phoenix (Arize) is the best alternative if you have a RAG pipeline and need to evaluate retrieval quality. Choosing an SLM with an active community also makes it easier to find solutions to monitoring problems.<\/p>\n<\/details>\n<details>\n<summary>When does it make sense to fine-tune instead of using RAG?<\/summary>\n<p>RAG is the first option when your data changes frequently or you need the model to cite specific sources: it requires no retraining and is updatable in real time. Fine-tuning is the right option when you need to modify the base behavior of the model: adopting a specific brand tone, classifying according to proprietary categories or generating code in an internal framework. Both patterns are complementary: combining them is the route to the best performance in closed domains. The decision about which to use also influences how to choose the most suitable base SLM for each approach.<\/p>\n<\/details>\n<\/section>\n<section class=\"nseo-sources\">\n<h2><span class=\"ez-toc-section\" id=\"Sources\"><\/span>Sources<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<ul>\n<li><a href=\"https:\/\/arxiv.org\/pdf\/2605.21442\" target=\"_blank\" rel=\"noopener\">torchtune: PyTorch native post-training library<\/a><\/li>\n<li><a href=\"https:\/\/latenode.com\/blog\/platform-comparisons-alternatives\/automation-platform-comparisons\/langchain-vs-llamaindex-2025-complete-rag-framework-comparison\" target=\"_blank\" rel=\"noopener\">LangChain vs LlamaIndex 2025: Complete RAG Framework Comparison &#8211; Latenode Blog<\/a><\/li>\n<li><a href=\"https:\/\/latenode.com\/blog\/llama-index-vs-langgraph\" target=\"_blank\" rel=\"noopener\">Llama Index vs Langgraph: Complete RAG Framework Comparison &#8211; Latenode Blog<\/a><\/li>\n<li><a href=\"https:\/\/langcopilot.com\/posts\/2025-09-18-top-rag-frameworks-2024-complete-guide\" target=\"_blank\" rel=\"noopener\">Best RAG Frameworks 2025: LangChain vs LlamaIndex vs Haystack vs RAGFlow | LLM Practical Experience Hub<\/a><\/li>\n<li><a href=\"https:\/\/www.spheron.network\/blog\/axolotl-vs-unsloth-vs-torchtune\/\" target=\"_blank\" rel=\"noopener\">Axolotl vs Unsloth vs TorchTune: Best LLM Fine-Tuning Frameworks in 2026 | Spheron Blog<\/a><\/li>\n<\/ul>\n<\/section>\n","protected":false},"excerpt":{"rendered":"<p>Complete guide to choosing an SLM: technical criteria, model comparison, deployment tools, RAG, fine-tuning and functional Python code for local integration.<\/p>\n","protected":false},"author":1,"featured_media":19753,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"content-type":"","footnotes":""},"categories":[13,1],"tags":[],"class_list":["post-19758","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-blog-tecnologia","category-sin-categorizar"],"_links":{"self":[{"href":"https:\/\/amara-marketing.com\/en\/wp-json\/wp\/v2\/posts\/19758","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/amara-marketing.com\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/amara-marketing.com\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/amara-marketing.com\/en\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/amara-marketing.com\/en\/wp-json\/wp\/v2\/comments?post=19758"}],"version-history":[{"count":0,"href":"https:\/\/amara-marketing.com\/en\/wp-json\/wp\/v2\/posts\/19758\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/amara-marketing.com\/en\/wp-json\/wp\/v2\/media\/19753"}],"wp:attachment":[{"href":"https:\/\/amara-marketing.com\/en\/wp-json\/wp\/v2\/media?parent=19758"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/amara-marketing.com\/en\/wp-json\/wp\/v2\/categories?post=19758"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/amara-marketing.com\/en\/wp-json\/wp\/v2\/tags?post=19758"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}