<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[Alexander's blog RSS Feed]]></title><description><![CDATA[Blog related to software development.]]></description><link>https://blog.alexpvalencia.com</link><generator>GatsbyJS</generator><lastBuildDate>Mon, 19 Oct 2026 19:08:00 GMT</lastBuildDate><item><title><![CDATA[DeepSeek V4.1-Flash-1017 Brings Stronger Coding and a Web Search API]]></title><description><![CDATA[What Happened? On October 17, 2026, DeepSeek released DeepSeek-V4.1-Flash-1017, a new post-training checkpoint of the V4.1-Flash model it…]]></description><link>https://blog.alexpvalencia.com/deepseek-v4-1-flash-1017-brings-stronger-coding-and-a-web-search-api/</link><guid isPermaLink="false">https://blog.alexpvalencia.com/deepseek-v4-1-flash-1017-brings-stronger-coding-and-a-web-search-api/</guid><pubDate>Mon, 19 Oct 2026 18:04:43 GMT</pubDate><content:encoded>&lt;h2&gt;What Happened?&lt;/h2&gt;
&lt;p&gt;On October 17, 2026, DeepSeek released &lt;strong&gt;DeepSeek-V4.1-Flash-1017&lt;/strong&gt;, a new post-training checkpoint of the V4.1-Flash model it first shipped in September. The weights are published on Hugging Face and ModelScope, and the model is already serving traffic on DeepSeek’s website, app and API.&lt;/p&gt;
&lt;p&gt;The checkpoint arrived with a second launch that may matter even more to developers: DeepSeek opened its in-house web search engine to the public through two new endpoints, a &lt;strong&gt;Search API&lt;/strong&gt; and a &lt;strong&gt;Fetch API&lt;/strong&gt;. Until now that engine only powered DeepSeek’s own products.&lt;/p&gt;
&lt;p&gt;DeepSeek describes the update as a “Pareto improvement”: higher benchmark scores, faster task completion and shorter outputs, all at once. In practice that means you get better results and pay for fewer tokens.&lt;/p&gt;
&lt;h3&gt;Why It Matters&lt;/h3&gt;
&lt;p&gt;Two trends meet in this release.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Open-weight models keep closing the gap on agentic coding.&lt;/strong&gt; On DeepSeek’s own numbers, an open model with only about 16B active parameters per generated token now scores in the same range as top proprietary models on several software engineering benchmarks.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Agents need tools, not just tokens.&lt;/strong&gt; A coding or research agent is only as good as the context it can pull in. Shipping a cheap, model-agnostic search and fetch layer next to the model gives developers a building block that used to require a third-party search provider.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;For teams that run agents at scale, the cost side is the headline. The model is cheap per token, it writes shorter answers, and the tool calls it relies on are now priced per request.&lt;/p&gt;
&lt;h3&gt;Technical Details&lt;/h3&gt;
&lt;p&gt;&lt;strong&gt;The model.&lt;/strong&gt; V4.1-Flash is a Mixture-of-Experts model built on what DeepSeek calls a &lt;strong&gt;Causal Encoder-Decoder (CED)&lt;/strong&gt; design. According to DeepSeek and coverage of the September launch:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Size&lt;/strong&gt;: about &lt;strong&gt;552B total parameters&lt;/strong&gt;, with roughly &lt;strong&gt;8B active per token during prefill&lt;/strong&gt; and &lt;strong&gt;16B during decoding&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Layout&lt;/strong&gt;: 40 Transformer layers, split into 20 causal encoder layers that process the input and 20 decoder layers that generate output.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Context&lt;/strong&gt;: up to &lt;strong&gt;1M tokens&lt;/strong&gt;, with text and image input and text output.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Memory&lt;/strong&gt;: an FP4 KV cache and compressed attention cut KV cache memory to about a quarter of the previous V4-Flash, which makes long contexts cheaper to serve.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;The 1017 checkpoint keeps that architecture. What changed is post-training: DeepSeek used reinforcement learning with self-feedback on end-to-end projects, such as building games or 3D scenes from scratch, to improve long-horizon development work.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;The benchmarks.&lt;/strong&gt; These are DeepSeek’s self-reported figures, so treat them as a starting point rather than a final verdict:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;DeepSWE v1.1&lt;/strong&gt;: &lt;strong&gt;77.0&lt;/strong&gt;, up from 74.2 for the September V4.1-Flash. DeepSeek’s table lists Claude Opus 5 at 74.0 and GPT 5.6-Sol at 73.0.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Terminal-Bench 4.0&lt;/strong&gt;: 42.3, up from 31.2, though Claude Opus 5 still leads at 51.8.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Agents’ Last Exam&lt;/strong&gt;: 35.4, up from 31.8.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;The checkpoint improves on its predecessor across every benchmark DeepSeek reported, but proprietary frontier models still lead on several of them, including Terminal-Bench, ProgramBench, NL2Repo and Humanity’s Last Exam. In short, it is very strong for its cost, not best at everything.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;The Search and Fetch APIs.&lt;/strong&gt; Both are simple REST endpoints on &lt;code class=&quot;language-text&quot;&gt;api.deepseek.com&lt;/code&gt;:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code class=&quot;language-text&quot;&gt;POST /v1/tools/search&lt;/code&gt; returns ranked web results for a query. You can ask for 1 to 50 results, optionally include page content, and use operators such as &lt;code class=&quot;language-text&quot;&gt;site:&lt;/code&gt;, &lt;code class=&quot;language-text&quot;&gt;-site:&lt;/code&gt;, &lt;code class=&quot;language-text&quot;&gt;lang:&lt;/code&gt;, &lt;code class=&quot;language-text&quot;&gt;after:&lt;/code&gt; and &lt;code class=&quot;language-text&quot;&gt;before:&lt;/code&gt;. Each result includes a &lt;strong&gt;rerank score (0–3)&lt;/strong&gt; and an &lt;strong&gt;authority tier (0–4)&lt;/strong&gt;, plus a short &lt;code class=&quot;language-text&quot;&gt;snippet&lt;/code&gt; for UIs and a longer &lt;code class=&quot;language-text&quot;&gt;summary&lt;/code&gt; written for models.&lt;/li&gt;
&lt;li&gt;&lt;code class=&quot;language-text&quot;&gt;POST /v1/tools/fetch&lt;/code&gt; takes a URL and returns the page as &lt;strong&gt;Markdown&lt;/strong&gt;, which is the format most agents want anyway.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;A minimal search request looks like this:&lt;/p&gt;
&lt;div class=&quot;gatsby-highlight&quot; data-language=&quot;bash&quot;&gt;&lt;pre class=&quot;language-bash&quot;&gt;&lt;code class=&quot;language-bash&quot;&gt;&lt;span class=&quot;token function&quot;&gt;curl&lt;/span&gt; https://api.deepseek.com/v1/tools/search &lt;span class=&quot;token punctuation&quot;&gt;\&lt;/span&gt;
  &lt;span class=&quot;token parameter variable&quot;&gt;-H&lt;/span&gt; &lt;span class=&quot;token string&quot;&gt;&quot;Authorization: Bearer &lt;span class=&quot;token variable&quot;&gt;$DEEPSEEK_API_KEY&lt;/span&gt;&quot;&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;\&lt;/span&gt;
  &lt;span class=&quot;token parameter variable&quot;&gt;-H&lt;/span&gt; &lt;span class=&quot;token string&quot;&gt;&quot;Content-Type: application/json&quot;&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;\&lt;/span&gt;
  &lt;span class=&quot;token parameter variable&quot;&gt;-d&lt;/span&gt; &lt;span class=&quot;token string&quot;&gt;&apos;{&quot;query&quot;: &quot;vector database benchmarks site:github.com after:2026&quot;, &quot;count&quot;: 5}&apos;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;h3&gt;What It Means for Developers&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Cheap agent backends&lt;/strong&gt;: the model is served as &lt;code class=&quot;language-text&quot;&gt;deepseek-flash&lt;/code&gt; through OpenAI- and Anthropic-compatible endpoints. DeepSeek lists peak prices of &lt;strong&gt;$0.30 per million input tokens&lt;/strong&gt; (cache miss) and &lt;strong&gt;$1.20 per million output tokens&lt;/strong&gt;, with off-peak rates at half price. Several third-party hosts list the snapshot for less.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Predictable tool pricing&lt;/strong&gt;: Search and Fetch each cost &lt;strong&gt;$0.75 per 1,000 successful requests&lt;/strong&gt;. Failed calls, timeouts and empty results are not billed, and the result count doesn’t change the price.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;A free trial window&lt;/strong&gt;: server-side Search and Fetch calls made through DeepSeek Harness, Claude Code or Codex are free until &lt;strong&gt;November 1, 2026 (00:00 Beijing time)&lt;/strong&gt;. That’s a good time to benchmark them against your current search provider.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Self-hosting is possible, but heavy&lt;/strong&gt;: running a 552B MoE model yourself still means a multi-GPU server. Check the model card for the exact license and hardware notes before you plan a deployment.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Validate on your own tasks&lt;/strong&gt;: the benchmark gains are self-reported. Run the checkpoint against your own repository or eval suite before switching production traffic.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;One practical point: the Search and Fetch APIs are &lt;strong&gt;model-agnostic&lt;/strong&gt;. Nothing stops you from wiring them into an agent that runs on a different model, which makes them interesting even if you never use DeepSeek’s LLM.&lt;/p&gt;
&lt;h3&gt;Conclusion&lt;/h3&gt;
&lt;p&gt;DeepSeek-V4.1-Flash-1017 is an incremental checkpoint on paper, but it shows how fast the open-weight tier is moving: better agentic coding scores, shorter outputs and a lower bill, all in a model you can download. The bigger long-term story may be the Search and Fetch APIs, which give developers a cheap, agent-friendly way to ground models in live web data. If you build coding or research agents, the free window until November 1 is a low-risk chance to try both.&lt;/p&gt;
&lt;h3&gt;Sources&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;https://api-docs.deepseek.com/news/news261017/&quot;&gt;DeepSeek: DeepSeek-V4.1-Flash-1017 release notes&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://api-docs.deepseek.com/guides/search&quot;&gt;DeepSeek API docs: Search and Fetch guide&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://www.marktechpost.com/2026/10/17/deepseek-just-released-v4-1-flash-1017-scores-77-0-on-deepswe-opens-search-api/&quot;&gt;MarkTechPost: DeepSeek releases V4.1-Flash-1017, scores 77.0 on DeepSWE, opens Search API&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://techbriefly.com/2026/10/19/deepseek-v4-1-flash-1017-faster-tasks-search-api/&quot;&gt;TechBriefly: DeepSeek updates V4.1-Flash to speed up tasks, opens search API&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://www.ithome.com.tw/news/178871&quot;&gt;iThome: DeepSeek V4.1-Flash launch and architecture&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;</content:encoded></item><item><title><![CDATA[TorchNeuron: AWS Trainium Becomes a Native PyTorch Backend]]></title><description><![CDATA[What Happened? On October 19, 2026, AWS and the PyTorch team announced TorchNeuron, an open-source, native PyTorch backend for AWS Trainium…]]></description><link>https://blog.alexpvalencia.com/torchneuron-aws-trainium-becomes-a-native-pytorch-backend/</link><guid isPermaLink="false">https://blog.alexpvalencia.com/torchneuron-aws-trainium-becomes-a-native-pytorch-backend/</guid><pubDate>Mon, 19 Oct 2026 17:34:16 GMT</pubDate><content:encoded>&lt;h2&gt;What Happened?&lt;/h2&gt;
&lt;p&gt;On October 19, 2026, AWS and the PyTorch team announced &lt;strong&gt;TorchNeuron&lt;/strong&gt;, an open-source, native PyTorch backend for AWS Trainium chips. The project is licensed under &lt;strong&gt;Apache 2.0&lt;/strong&gt; and enters public beta on &lt;strong&gt;October 20&lt;/strong&gt;, to coincide with PyTorch Conference North America in San Jose. It supports &lt;strong&gt;Trainium2 and Trainium3&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;The pitch is simple: take ordinary PyTorch code, change the device to &lt;code class=&quot;language-text&quot;&gt;neuron&lt;/code&gt;, and run it. You shouldn’t need a Neuron-specific rewrite, a special tracing step or a separate model definition. If that holds up, it matters a lot for anyone who has avoided non-NVIDIA accelerators because of the migration cost.&lt;/p&gt;
&lt;h3&gt;Why It Matters&lt;/h3&gt;
&lt;p&gt;PyTorch has become the default language of AI. Amazon’s announcement says that about 85% of AI researchers and developers write their code in PyTorch. But in practice “PyTorch” has usually meant “PyTorch on CUDA”. Other accelerators have worked through adapter layers, separate compilation workflows or partial op coverage, and each of those adds friction:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Porting cost&lt;/strong&gt;: moving a model to new hardware often meant rewriting and revalidating code, which could take months.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Debugging pain&lt;/strong&gt;: graph-based or lazy-execution stacks make it harder to use &lt;code class=&quot;language-text&quot;&gt;print&lt;/code&gt;, breakpoints and Python control flow.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Ecosystem gaps&lt;/strong&gt;: libraries such as Hugging Face Transformers, TorchTitan or vLLM expect a “real” device, not a bolted-on one.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;TorchNeuron tries to remove that friction by making Trainium a first-class PyTorch device. For the industry, this is another step toward breaking the lock-in that CUDA has given NVIDIA. For developers, it means more hardware choice without learning a new framework.&lt;/p&gt;
&lt;h3&gt;How It Works Under the Hood&lt;/h3&gt;
&lt;p&gt;TorchNeuron is built on PyTorch’s official extension points for out-of-tree hardware, not on a fork.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;PrivateUse1 device registration&lt;/strong&gt;: Trainium is registered through PyTorch’s &lt;code class=&quot;language-text&quot;&gt;PrivateUse1&lt;/code&gt; mechanism and exposed as the &lt;code class=&quot;language-text&quot;&gt;neuron&lt;/code&gt; device. As a result, &lt;code class=&quot;language-text&quot;&gt;torch.nn&lt;/code&gt;, &lt;code class=&quot;language-text&quot;&gt;torch.autocast&lt;/code&gt;, &lt;code class=&quot;language-text&quot;&gt;torch.distributed&lt;/code&gt; and &lt;code class=&quot;language-text&quot;&gt;torch.profiler&lt;/code&gt; work as written. Code written against the device-agnostic &lt;code class=&quot;language-text&quot;&gt;torch.accelerator&lt;/code&gt; API also runs unchanged.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Eager mode&lt;/strong&gt;: operations run immediately, so normal Python debugging works. Each op is compiled into a Neuron executable (a NEFF file) and launched on the device. An experimental &lt;strong&gt;adaptive eager mode&lt;/strong&gt; fuses operations and cuts launch overhead to get closer to compiled performance.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;torch.compile&lt;/strong&gt;: TorchDynamo captures an FX graph, AOTAutograd traces the backward pass, the Neuron backend lowers the graph through &lt;strong&gt;Torch-MLIR to StableHLO&lt;/strong&gt;, and the Neuron compiler emits the final executable. You can compile a whole model or just parts of it. FlexAttention is supported natively.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Custom kernels with NKI&lt;/strong&gt;: the &lt;strong&gt;Neuron Kernel Interface&lt;/strong&gt; lets you write your own kernels and register them as regular PyTorch custom ops, including autograd support. AWS has also open-sourced &lt;strong&gt;NKI-lib&lt;/strong&gt;, which includes optimized kernels such as FlashAttention and MoE blockwise kernels.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Here is what the developer-facing API looks like:&lt;/p&gt;
&lt;div class=&quot;gatsby-highlight&quot; data-language=&quot;python&quot;&gt;&lt;pre class=&quot;language-python&quot;&gt;&lt;code class=&quot;language-python&quot;&gt;&lt;span class=&quot;token keyword&quot;&gt;import&lt;/span&gt; torch

&lt;span class=&quot;token comment&quot;&gt;# Eager mode: the only change is the device&lt;/span&gt;
model &lt;span class=&quot;token operator&quot;&gt;=&lt;/span&gt; MyModel&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;to&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token string&quot;&gt;&quot;neuron&quot;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;
optimizer &lt;span class=&quot;token operator&quot;&gt;=&lt;/span&gt; torch&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;optim&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;AdamW&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;model&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;parameters&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;

&lt;span class=&quot;token comment&quot;&gt;# Compiled mode&lt;/span&gt;
torch&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;compiler&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;set_default_backend&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token string&quot;&gt;&quot;neuron&quot;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;
model&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;token builtin&quot;&gt;compile&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;Hugging Face Transformers v5 can load models straight onto the device with &lt;code class=&quot;language-text&quot;&gt;device_map=&quot;neuron&quot;&lt;/code&gt;.&lt;/p&gt;
&lt;h3&gt;Distributed Training Support&lt;/h3&gt;
&lt;p&gt;Large-scale training is where Trainium is meant to compete, and TorchNeuron supports the standard PyTorch distributed stack:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Parallelism strategies&lt;/strong&gt;: DDP, FSDP2, SimpleFSDP, tensor parallelism and pipeline parallelism, including combinations such as FSDP2 + TP.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Sharding primitives&lt;/strong&gt;: &lt;code class=&quot;language-text&quot;&gt;DTensor&lt;/code&gt; and &lt;code class=&quot;language-text&quot;&gt;DeviceMesh&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Collectives&lt;/strong&gt;: &lt;code class=&quot;language-text&quot;&gt;all_reduce&lt;/code&gt;, &lt;code class=&quot;language-text&quot;&gt;all_gather&lt;/code&gt;, &lt;code class=&quot;language-text&quot;&gt;reduce_scatter&lt;/code&gt; and point-to-point send/recv. Within a node these run on dedicated collective cores, and across nodes they run over Elastic Fabric Adapter (EFA).&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;There is also a &lt;code class=&quot;language-text&quot;&gt;torchtitan-neuron&lt;/code&gt; repository that plugs Trainium-specific kernels and configs into &lt;strong&gt;TorchTitan&lt;/strong&gt;. The announcement includes an example that trains Llama 3 8B on a single &lt;code class=&quot;language-text&quot;&gt;trn2.48xlarge&lt;/code&gt; instance with SimpleFSDP and &lt;code class=&quot;language-text&quot;&gt;torch.compile&lt;/code&gt;.&lt;/p&gt;
&lt;h3&gt;What’s Not There Yet&lt;/h3&gt;
&lt;p&gt;This is a beta, and AWS is open about the gaps. In its run of PyTorch’s upstream test suite, about 39K tests were deliberately skipped for Neuron. The largest group (around 22K) covers operators that don’t have a native Neuron lowering yet. Features that are not supported in this first release include:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Sparse tensors and NestedTensor&lt;/li&gt;
&lt;li&gt;Forward-mode autograd (JVP)&lt;/li&gt;
&lt;li&gt;Dynamic and symbolic shapes&lt;/li&gt;
&lt;li&gt;Arbitrary attention masks in native MHA (no-mask and causal masks work)&lt;/li&gt;
&lt;li&gt;Per-channel quantization and bilinear/bicubic upsampling&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;FP8 and TorchAO support are in private beta. AWS also says it swept about 100K Hugging Face models in reduced configurations and is still working through the remaining failures. Customer numbers in the announcement are vendor-reported. For example, Deepgram says it got roughly 60% more audio processed per dollar than its GPU baseline. Benchmark your own workloads before you trust figures like that.&lt;/p&gt;
&lt;h3&gt;What It Means for Developers&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Write device-agnostic code.&lt;/strong&gt; If you use &lt;code class=&quot;language-text&quot;&gt;torch.accelerator&lt;/code&gt; and avoid hard-coded &lt;code class=&quot;language-text&quot;&gt;&quot;cuda&quot;&lt;/code&gt; strings, your code is much easier to move to Trainium and other backends.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Try it on a real model.&lt;/strong&gt; Install &lt;code class=&quot;language-text&quot;&gt;torch-neuronx&lt;/code&gt; from the AWS Neuron pip repository, move a model to &lt;code class=&quot;language-text&quot;&gt;neuron&lt;/code&gt;, and check op coverage before you plan a migration.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Keep kernels as an escape hatch.&lt;/strong&gt; Start with eager mode or &lt;code class=&quot;language-text&quot;&gt;torch.compile&lt;/code&gt;, and write NKI kernels only for the hot spots the profiler shows you.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Watch the dynamic shapes gap.&lt;/strong&gt; Workloads with highly variable sequence lengths may run into the current limits on dynamic shapes.&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;Conclusion&lt;/h3&gt;
&lt;p&gt;TorchNeuron is less about one chip and more about a pattern: hardware vendors are meeting developers inside PyTorch instead of asking them to adopt new tooling. Because it is built on PrivateUse1, torch.compile and the standard distributed APIs, Trainium now behaves much more like any other PyTorch device. It’s still a beta with real gaps, but if you train or serve models on AWS, it’s worth testing. Compute choice is getting a little less tied to CUDA.&lt;/p&gt;
&lt;h3&gt;Sources&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;https://pytorch.org/blog/introducing-torchneuron-native-pytorch-backend-for-aws-trainium/&quot;&gt;Introducing TorchNeuron: Native PyTorch backend for AWS Trainium (PyTorch Blog)&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://www.aboutamazon.com/news/innovation-at-amazon/torchneuron-pytorch-aws-trainium-chips-ai&quot;&gt;Amazon’s TorchNeuron runs PyTorch on AWS Trainium chips (About Amazon)&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://thenextweb.com/news/amazon-torchneuron-pytorch-trainium&quot;&gt;Amazon’s TorchNeuron lets PyTorch code run on AWS Trainium chips (The Next Web)&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://awsdocs-neuron.readthedocs-hosted.com/en/latest/frameworks/torch/pytorch-native-overview.html&quot;&gt;Native PyTorch for AWS Trainium (AWS Neuron Documentation)&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;</content:encoded></item><item><title><![CDATA[Understanding Hexagonal Architecture]]></title><description><![CDATA[What is Hexagonal Architecture? Hexagonal architecture, also known as ports and adapters architecture, is a software design pattern that…]]></description><link>https://blog.alexpvalencia.com/design-patterns/hexagonal-architecture/</link><guid isPermaLink="false">https://blog.alexpvalencia.com/design-patterns/hexagonal-architecture/</guid><pubDate>Sat, 24 Dec 2022 04:31:39 GMT</pubDate><content:encoded>&lt;h2&gt;What is Hexagonal Architecture?&lt;/h2&gt;
&lt;p&gt;Hexagonal architecture, also known as ports and adapters architecture, is a software design pattern that aims to decouple the business logic of a software application from its external dependencies, such as databases, messaging systems, and web interfaces.&lt;/p&gt;
&lt;p&gt;The idea behind hexagonal architecture is to create a core domain of the application, which contains all the business logic and is independent of any external dependencies. This core domain is surrounded by a series of adapters, which allow the application to interact with external systems and devices.&lt;/p&gt;
&lt;h3&gt;Benefits of Hexagonal Architecture&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Loose coupling&lt;/strong&gt;: By separating the core domain from external dependencies, hexagonal architecture helps to reduce the level of coupling between different parts of the application. This makes it easier to modify or replace one part of the system without affecting the others.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Testability&lt;/strong&gt;: Hexagonal architecture makes it easier to test the core domain of the application in isolation, as it is not dependent on external systems. This can lead to more reliable and maintainable tests.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Flexibility&lt;/strong&gt;: The adapters in hexagonal architecture can be easily swapped out or replaced, which makes it easier to modify the application to work with different external systems or devices.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;How to Implement Hexagonal Architecture&lt;/h3&gt;
&lt;ol&gt;
&lt;li&gt;Identify the core domain of the application, which contains the business logic and is independent of external dependencies.&lt;/li&gt;
&lt;li&gt;Create a series of interfaces or “ports” that define the ways in which the core domain can interact with external systems or devices.&lt;/li&gt;
&lt;li&gt;Implement adapters for each external dependency, which implement the necessary ports and allow the core domain to interact with the external system or device.&lt;/li&gt;
&lt;li&gt;Use dependency injection to inject the necessary adapters into the core domain, allowing it to interact with external dependencies through the ports.&lt;/li&gt;
&lt;/ol&gt;
&lt;h3&gt;Example of Hexagonal Architecture&lt;/h3&gt;
&lt;p&gt;Here is a simple example of how hexagonal architecture might be implemented in a web application:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;The core domain of the application contains the business logic for creating and managing user accounts.&lt;/li&gt;
&lt;li&gt;A port is defined for storing user accounts in a database.&lt;/li&gt;
&lt;li&gt;An adapter is implemented for a specific database system (e.g. MySQL), which implements the database storage port.&lt;/li&gt;
&lt;li&gt;A web interface adapter is implemented, which allows users to create and manage their accounts through a web browser. This adapter implements the necessary ports for interacting with the core domain and handles the details of rendering HTML pages and handling HTTP requests and responses.&lt;/li&gt;
&lt;li&gt;The core domain is injected with the necessary adapters (database storage and web interface) at runtime, allowing it to interact with external dependencies through the defined ports.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Hexagonal architecture can be applied to a wide range of applications and architectures, including web, mobile, and desktop applications, as well as microservice architectures. It can help to improve the testability, maintainability, and flexibility of your software application.&lt;/p&gt;</content:encoded></item><item><title><![CDATA[Hello World]]></title><description><![CDATA[Hi everyone! Welcome to the blog. My name is Alex and I am passionate about the world of software development. Here you will find articles…]]></description><link>https://blog.alexpvalencia.com/hello-world/</link><guid isPermaLink="false">https://blog.alexpvalencia.com/hello-world/</guid><pubDate>Fri, 09 Dec 2022 22:12:03 GMT</pubDate><content:encoded>&lt;h3&gt;Hi everyone!&lt;/h3&gt;
&lt;p&gt;Welcome to the blog. My name is Alex and I am passionate about the world of software development. Here you will find articles and tutorials on topics related to software development, including programming languages, frameworks, agile methodologies and much more.&lt;/p&gt;
&lt;p&gt;If you are a beginner in the world of software development, I hope this blog serves as a guide for you to start learning and better understand how the software development process works. If you are an experienced developer, I hope you find something interesting and useful here.&lt;/p&gt;
&lt;p&gt;On this blog, my goal is to share my knowledge and experience in the field of software development to help others learn and improve their skills. So if you have any questions or suggestions, don’t hesitate to leave a comment or contact me.&lt;/p&gt;
&lt;p&gt;I hope you enjoy the blog and learn a lot!&lt;/p&gt;
&lt;p&gt;Best regards.&lt;/p&gt;</content:encoded></item></channel></rss>