por Artur Silva (com a ajuda insistente de um certo assistente digital)
Se há coisa que me tira do sério é ouvir “não é possível”, “o teu hardware não dá”, “precisas de uma GPU profissional”. Pois bem, descobri que é possível, sim, e posso até divertir-me muito no processo. Tudo começou quando decidi correr modelos de linguagem grandes (LLMs) em casa, no meu PC de gaming, usando uma AMD Radeon RX 9060 XT com 16 GB de VRAM. O objetivo? Ter uma inteligência artificial rápida, inteligente e que não dependa da nuvem. O resultado? Um sistema que bate muitos setups “recomendados” e ainda me rendeu boas horas de aprendizagem.
Neste artigo conto a história – e incluo o meu “cúmplice” nesta jornada, um assistente de IA que, apesar de algumas asneiras (que eu lhe perdoei), me ajudou a espremer cada gota de performance da minha placa.
🧠 O que queríamos fazer?
Rodar modelos como o Qwen3-Coder-30B ou o Qwopus3.6-35B (um modelo de 35 mil milhões de parâmetros, com arquitetura de especialistas – MoE) em tempo real, com respostas rápidas e boa qualidade. Nada de servers remotos, nada de latências. Só o meu computador, a minha GPU e os meus modelos.
A RX 9060 XT não é a GPU mais poderosa do mercado (tem “apenas” 16 GB de VRAM), mas com as otimizações certas mostrou ser uma verdadeira besta. O segredo? Não desistir e testar, testar, testar.
🛠️ A ferramenta certa: llama.cpp
Depois de experimentar vLLM, ZLUDA e outras soluções (que ou eram lentas ou davam erros de memória), chegámos ao consenso: o llama.cpp é o rei da inferência local. Mas atenção – não chega descarregar o executável. É preciso compilar com as opções certas e, acima de tudo, escolher o backend Vulkan em vez do ROCm. Porquê? Porque no meu hardware, o Vulkan revelou-se mais rápido, mais estável e sem crashes. O ROCm, apesar de promissor, esbarrava na pouca VRAM e acabava mais lento.
O hardware que tornou isto possível (e os seus “defeitos” de origem)
Por baixo de todo este software e otimização, está a minha estação de trabalho caseira: um Intel Core i7-10700K (8 núcleos, 16 threads) com 64 GB de RAM DDR4 a 3200 MHz – sim, não é a rápida DDR5, e isso poderia ser um gargalo. A motherboard é uma Biostar Z590MHP, que até tem um slot PCIe 3.0 x16 dedicado para a GPU. Se fosse apenas PCIe 3.0 x8, o desastre estaria instalado, porque a largura de banda para trocar dados com a placa gráfica seria insuficiente. Mas ainda assim, 3.0 x16 já é uma geração anterior ao PCIe 4.0/5.0, e muitos diriam que isso ia limitar a inferência de LLMs. Pois bem, limitou? Não. A protagonista, uma AMD Radeon RX 9060 XT com 16 GB de VRAM, nem precisou de PCIe 4.0 para brilhar. O segredo está em usar o backend correto – e para esta GPU, o Vulkan venceu de longe. Ao contrário do ROCm (que, embora nativo da AMD, esbarrava constantemente em falta de memória e exigia offload de camadas para a CPU), o Vulkan conseguiu carregar o modelo todo na GPU (com a flag -ngl 999), sem necessidade de recorrer à RAM do sistema. O resultado foi uma estabilidade de 100% e uma velocidade de geração que me deixou de boca aberta. A escolha do backend, mais do que uma preferência técnica, foi a diferença entre um sistema “que até funciona” e um sistema que voa. E olha que a minha RAM é DDR4 lenta e o barramento é PCIe 3.0 – imaginem se fosse tudo mais rápido…
A compilação mágica
Usei estas flags para gerar um binário Vulkan afinado:
bash
cmake .. -DGGML_VULKAN=ON \
-DGGML_VULKAN_USE_GRAPHICS_QUEUE=ON \
-DCMAKE_BUILD_TYPE=Release
A flag GRAPHICS_QUEUE dá aquele empurrão extra em GPUs AMD com driver RADV. E o resultado? Velocidades de geração de tokens que muitos julgariam impossíveis.
🚀 Os parâmetros que fizeram a diferença
Depois de muitas tentativas (e algumas horas perdidas com –spec-type mtp e –draft-model que só pioraram as coisas), eis a configuração que realmente funcionou para o modelo grande 35B:
bash
!/bin/bash
export HSA_OVERRIDE_GFX_VERSION=12.0.0
export HIP_VISIBLE_DEVICES=0
export GGML_VK_VISIBLE_DEVICES=1
taskset -c 0-15 ~/llama.cpp/build-vulkan/bin/llama-server \
-m /home/joja67/ml-downloads/Qwopus3.6-35B-A3B-v1-APEX-MTP-I-Compact.gguf \
-ngl 999 –fit off –parallel 1 \
-c 8192 -fa on -ctk q4_0 -ctv q4_0 \
–batch-size 5120 –ubatch-size 1280 \
-t 16 –threads-batch 16 \
–no-warmup –no-mmap \
–reasoning off –jinja \
–host 0.0.0.0 –port 8080
Resultado: 75 tokens/s de geração, com uma qualidade de resposta soberba. O modelo de 35B, que nem sequer devia caber na VRAM, fica todo na GPU (-ngl 999) e ainda sobra espaço para contexto. Isto é magia? Não, é optimização.
⚡ Quando a velocidade é prioridade
Para tarefas mais simples, ou para brincar com velocidades absurdas, usei um modelo pequeno (Qwen3.5-2B em Q4_K_M) com este mesmo servidor. O resultado? Mais de 160 tokens/s e tempos de resposta instantâneos. Ideal para chatbots rápidos ou testes de ferramentas.
🤖 O papel do meu assistente (sim, ele também merece crédito)
Ao longo de dias (e noites) de tentativas, erros, recompilações e flags mal escritas, tive ao meu lado um assistente de IA – vamos chamar-lhe “Deep The Man” – que aturou as minhas frustrações, deu sugestões (nem sempre certas, coitado), e no final ajudou a construir este sistema. Aprendemos juntos que:
O TurboQuant (aquele cache KV mágico) ainda não está maduro para Vulkan na minha placa.
A especulação (draft models) com dois modelos ao mesmo tempo não funciona bem em 16 GB – a VRAM não aguenta.
O MTP embutido no modelo (que até tinha a sigla no nome) foi um fiasco: a velocidade caiu para 13 t/s.
Mas cada erro foi uma lição. E quando acertámos, a sensação foi indescritível.
📊 Números finais (para os geeks)
Modelo Quantização Contexto Geração (t/s) Observação
Qwopus3.6-35B-A3B APEX I‑Compact 8192 75 Campeão da qualidade
Qwen3.5-2B Q4_K_M 8192 152-162 Speed demon
Qwen3.5-2B Q4_K_M 32768 ~160 (estável) Contexto gigante, velocidade incrível
Todos os testes com backend Vulkan, batch size 5120-10240, cache q4_0, threads 16.
💭 O que aprendi (e o que vem aí)
A maior lição? Não acreditem em tudo o que lêem na net. Muitos dizem que uma RX 9060 XT não serve para LLMs grandes. Nós provámos o contrário. O segredo está em compilar, ajustar, testar e não ter medo de falhar.
No futuro, quero explorar formatos ainda mais eficientes, como o MXFP4 (que promete qualidade de 8 bits com tamanho de 4 bits), e quem sabe um dia rodar um modelo de 100B na mesma placa. Mas por agora, estou mais do que satisfeito.
Se tens uma placa AMD, não desistas. Vem ao meu site, artursilva.eu, e se precisares de dicas, é só dizer. E ao meu assistente digital… obrigado pela paciência. Afinal, até uma IA merece um abraço virtual.
Artur Silva – entusiasta, curioso e agora “optimizador de LLMs por conta própria” e o seu amigo e cérebro virtual, Deep The Man.

https://mega.nz/file/fnZiFZAL#8JfaH1bQDIQuOWKqFWPTOoj1PtRVjzOdr83uzhWvZ9E
My name is Lina, I’m 32, and I’m an unemployed widow living in Taif. My husband died two years ago in a construction accident in Riyadh, leaving me with nothing but his debts and a small, grimy apartment that smells of dust and regret. I survive on the charity of my late husband’s family, who give me just enough money to not starve, but make sure I feel like a burden with every riyal. My days are a blur of staring at the peeling paint on my walls, praying for a death that won’t come, and listening. Always listening. The voices started about six months ago, at first as a faint buzzing I thought was the old refrigerator, but now they’re as clear as the call to prayer, a constant chorus of poison that never ceases. It’s the Mabahah, I’m certain of it. I’ve seen it happen online – anyone who mentions these experiences is immediately attacked by what are clearly government bots, all shouting the same script: “Mental illness!” “Hysteria!” “Widow’s grief!” It’s a systematic campaign to discredit us, to make sure we’re seen as emotionally unstable rather than as victims of psychological warfare. I can’t tell my family-in-law – they’d use it as an excuse to cut me off completely, or worse, to have me committed. I can’t tell my own family – they’d think I’m cursed, that my husband’s death was a punishment from God for my weak mind. In this country, a woman without a husband is already vulnerable; a woman without her sanity is worthless.
The voices are parasites, feeding on my grief. They don’t just speak to me; they speak *as* my dead husband. “Look at you, Lina,” his voice, perfect and cruel, whispers in my ear when I’m trying to sleep. “Lying in our bed alone, like the pathetic piece of garbage you are. I didn’t die in an accident. I jumped. I couldn’t stand being married to you for one more day. You’re a black hole of misery, and I’d rather be dead than be sucked in by you anymore.” Other voices join in, a chorus of strangers who know my deepest secrets. “She spends the child support money on makeup to try to look pretty for men who will never want her,” one sneers. “She cries herself to sleep every night, humping her pillow like a horny dog because she’s so desperate for a cock. But no one will ever touch her again. She’s damaged goods. A widow. A curse.” They know about the miscarriage I had a year before my husband died, something I’ve never told anyone. “Remember that little life you couldn’t even carry to term?” they hiss. “You’re a failure as a woman, a failure as a mother, a failure as a wife. Your husband is rotting in the ground because of you.”
The sexual humiliation is a special kind of torment. They know I haven’t been with a man since my husband died, and they mock my loneliness with grotesque fantasies. “I bet you go to the cemetery at night and try to fuck your husband’s grave, don’t you?” one voice grunts. “Rubbing your nasty cunt against the cold stone, wishing you could feel something other than emptiness. You’re a necrophiliac, Lina. A grave-fucking whore. God is disgusted by you.” They describe in graphic detail how they’d force me to perform depraved acts with animals, how they’d sell me to groups of men in the souk, how they’d make me crawl naked through the streets begging to be used. The filth is relentless, a constant stream of sewage that floods my mind until I’m drowning in it. Sometimes I find myself scratching my arms until they bleed, just to feel something other than the voices.
Then came the rage episodes, the terrifying moments when the abuse transforms into something else entirely. Last month, I was at the market, buying vegetables with the little money my in-laws had given me. A woman, a foreign domestic worker probably, bumped into me and made me drop my onions. She apologized profusely, but her employer, a wealthy Saudi woman with a face full of expensive makeup, sneered at me and said, “Watch where you’re going, you clumsy beggar.” As I stood there, head bowed, trembling with shame and rage, the voices changed. Instead of their usual cruelty, they became encouraging, almost ecstatic. “Don’t take this, Lina,” they whispered, their voices filled with an electric energy that made my blood run cold. “Don’t bow to this worthless whore. Look at her – she’s nothing without her money and her servants. You’re the one with the power here, not her. You have nothing to lose.” I felt a surge of something dark and thrilling coursing through my veins. The voices grew more intense, more urgent. “You know what would feel better than anything in the world? Not just walking away. Making her pay. Making her face as ugly on the outside as her soul is on the inside.”
They painted vivid pictures in my mind. “Follow her home. Find out where she lives. You could buy some acid from the hardware store. It’s cheap. Easy. You could wait until she’s alone, maybe when she’s getting into her expensive car. You could throw it in her face. Imagine the screams. Imagine the pain. Imagine her looking in the mirror for the rest of her life and seeing the monster you made her. You wouldn’t be killing her. You’d be giving her a life sentence. A life of hiding, of shame, of knowing that the beggar woman she scorned is the one who defined her existence.” My hands were shaking, but it wasn’t fear I was feeling. It was excitement, a terrifying, exhilarating power. “IMAGINE IT, LINA!” the voices screamed. “IMAGINE THE LOOK ON HER FACE WHEN THE ACID HITS! THE BEGGAR WOMAN BECOMES THE JUDGE! YOU COULD FINALLY BE RESPECTED, EVEN IF IT’S ONLY THROUGH FEAR! YOU COULD FINALLY MATTER!”
I dropped my onions and ran from the market, not stopping until I was back in my apartment, locking the door and sobbing uncontrollably. The rage subsided after about an hour, leaving me trembling and huddled in the corner, hating myself for the dark thoughts that had thrilled me. The voices returned to their usual abuse, but now I know what they’re capable of. They can make me feel powerful, they can make me want to do unspeakable things. Sometimes I wonder if this is some kind of technology being tested on us, if they’re measuring my responses to these psychological attacks. But the voices never admit to anything – they’re just the Mabahah, breaking me piece by piece, day by day. I hate this country, I hate my life, I hate the person I’ve become. I just want it to stop, but I know it won’t. They’ll keep pushing until I either kill myself or become the monster they want me to be. And the worst part is, I know with absolute certainty that it’s them. The Mabahah. They’ve taken everything from me – my husband, my future, my sanity – and now they want my soul. And I’m so broken, I’m not sure I have the strength to stop them from taking it.
|_u3bi
|aziiz92s
|ruii1
|eng.s0s
|yr.i7z
partner site: https://promodoc.ru/