---
title: "Python"
description: "252 posts about Python, summarised, each linking to the original."
---

# Python
> 252 posts about Python, summarised, each linking to the original.

## Articles

### [BigCodeArena: Judging code generations end to end with code executions](https://yomu.fyi/post/bigcodearena-judging-code-generations-end-to-end-with-code-executions.md)
- Company: [Hugging Face](https://yomu.fyi/company/hugging-face.md)
- Author: Terry Yue Zhuo
- Published: Oct 7, 2025
- Type: Announcement

Assessing AI-generated code via static inspection is error-prone and fails to reflect whether code functions correctly across real-world environments. BigCodeArena addresses this evaluation bottleneck as a human-in-the-loop platform that executes model outputs in real time inside isolated sandbox environments across ten programming languages and eight execution frameworks. Users interact directly with live applications, refine implementations through multi-turn conversations, and submit pairwise preference votes to generate Elo ratings via the Bradley-Terry model. In five months of community testing covering over 14,000 conversations, proprietary models including o3-mini and o1-mini led overall Elo rankings, while open models like Qwen2.5 and Llama-3.3-70B trailed closed competitors. The project has open-sourced its full evaluation pipelines, conversation datasets, and related benchmarks to support community-driven code generation assessment.


### [SOTA OCR with Core ML and dots.ocr](https://yomu.fyi/post/sota-ocr-with-core-ml-and-dots-ocr.md)
- Company: [Hugging Face](https://yomu.fyi/company/hugging-face.md)
- Author: Christopher Fleetwood, Pedro Cuenca
- Published: Oct 2, 2025
- Type: Tutorial

Running competitive models like RedNote's 3B parameter dots.ocr on-device provides zero-cost, network-free optical character recognition while leveraging power-efficient hardware like Apple's Neural Engine. Because the Neural Engine requires Core ML, converting the 1.2B parameter NaViT vision encoder from PyTorch requires resolving multiple graph tracing incompatibilities. The initial conversion pipeline targets FLOAT32 execution on GPU by capturing the execution graph with torch.jit.trace and compiling it via coremltools. Simplifying the model for single-image inference eliminates dynamic sequence masking, dynamic tensor iteration, and multi-attention complexity. Although the resulting Core ML model accurately matches PyTorch baseline numerical precision, the unoptimized artifact spans over 5GB and takes over one second per forward pass.


### [Accelerating Qwen3-8B Agent on Intel® Core™ Ultra with Depth-Pruned Draft Models](https://yomu.fyi/post/accelerating-qwen3-8b-agent-on-intel-coretm-ultra-with-depth-pruned-dr.md)
- Company: [Hugging Face](https://yomu.fyi/company/hugging-face.md)
- Author: Igor Margulis, Ofir Zafrir, Shira Guskin, Guy Boudoukh, Pedro Cuenca
- Published: Sep 29, 2025
- Type: Problem & solution

Local agentic AI workflows generate multi-step reasoning traces that increase token counts and strain real-time inference on personal computers. To accelerate execution, researchers implemented speculative decoding using OpenVINO.GenAI on an Intel Lunar Lake integrated GPU, pairing a 4-bit Qwen3-8B target model with a smaller Qwen3-0.6B draft model. By measuring angular distance across layers, the team pruned six of the draft model's twenty-eight layers to minimize draft latency and fine-tuned it on synthetic data generated from 500,000 prompts. This depth-pruned draft elevated speculative decoding throughput from a 1.3x speedup to a 1.4x speedup over the standalone baseline. Finally, deploying the optimized model alongside the Hugging Face smolagents framework allowed local agents to perform tool invocation and code generation tasks efficiently.


### [SyGra: The One-Stop Framework for Building Data for LLMs and SLMs](https://yomu.fyi/post/sygra-the-one-stop-framework-for-building-data-for-llms-and-slms.md)
- Company: [Hugging Face](https://yomu.fyi/company/hugging-face.md)
- Author: Bidyapati Pradhan, Vipul Mittal, Amit Kumar Saha, Surajit Dasgupta
- Published: Sep 22, 2025
- Type: Problem & solution

Training and aligning large language models and small language models requires datasets tailored for complex reasoning, preference tuning, multi-turn questioning, and format conversion. To eliminate the need for bespoke data preparation scripts, SyGra provides a low-code and no-code Python framework for automated dataset creation, transformation, and alignment. The library integrates with diverse inference backends, including vLLM, Hugging Face TGI, Triton, and Ollama, allowing teams to focus on prompt engineering rather than pipeline infrastructure. It supports data workflows ranging from converting PDFs and knowledge bases into question-answering pairs to filtering low-quality samples and generating Direct Preference Optimization datasets. These plug-and-play workflows reduce manual curation effort while accelerating model fine-tuning and retrieval-augmented generation pipelines.


### [Introducing the Okta Open Source MCP Server](https://yomu.fyi/post/introducing-the-okta-open-source-mcp-server.md)
- Company: [Okta](https://yomu.fyi/company/okta.md)
- Author: Swetha Selvanayagam
- Published: Sep 22, 2025
- Type: Announcement

The Okta Open Source MCP Server connects large language model agents to Okta’s Admin Management APIs for identity and access management workflows. It translates natural-language requests into structured API calls, supporting user and group management, group membership and application operations, system-log retrieval, and additional application and policy actions. The server uses Okta’s official SDK and supports interactive Device Authorization Grant authentication or browserless Private Key JWT, with scoped API access and credentials supplied through environment variables. The guide explains setup with Python 3.9 or later and uv, Okta application configuration, and VS Code’s MCP client settings, then shows examples including user administration and audit-report generation. Its stated purpose is to automate organization-management tasks while respecting Okta’s security model.


### [Gaia2 and ARE: Empowering the community to study agents](https://yomu.fyi/post/gaia2-and-are-empowering-the-community-to-study-agents.md)
- Company: [Hugging Face](https://yomu.fyi/company/hugging-face.md)
- Author: Clémentine Fourrier, Grégoire Mialon, Maxime Lecanu, Pierre Andrews, Adrien Carreira, frere thibaud, Avijit Ghosh, Romain Froger, Dheeraj Mekala, Caroline Pascal, Ulyana Piterbarg
- Published: Sep 22, 2025
- Type: Benchmark

Existing AI agent evaluation environments are often tightly coupled to specific tasks and fail to model real-world challenges such as API failures, spontaneous events, and asynchronous conditions. To address this limitation, the Gaia2 benchmark and the Meta Agents Research Environments (ARE) framework introduce interactive read-and-write evaluation. Gaia2 incorporates 1,000 human-created scenarios spanning multi-step execution, cross-source search, ambiguity handling, adaptability, temporal reasoning, agent collaboration, and noise tolerance. Using a simulated smartphone interface equipped with 101 tools, evaluations showed that GPT-5 with high reasoning scored highest overall, while Kimi K2 was the leading open-source model. The results demonstrated that instruction following and search do not reliably predict performance on closer-to-real-world tasks.


### [Scaleway on Hugging Face Inference Providers 🔥](https://yomu.fyi/post/scaleway-on-hugging-face-inference-providers.md)
- Company: [Hugging Face](https://yomu.fyi/company/hugging-face.md)
- Author: Guillaume Noale, Franck Pagny, Fred Bardolle, Guillaume Calmettes, Constance Morales, Célina Hanouti, Julien Chaumond, Simon Brandeis, Lucain Pouget
- Published: Sep 19, 2025
- Type: Announcement

Scaleway is integrated as a supported serverless Inference Provider on the Hugging Face Hub, expanding model deployment options across Hub model pages and official client SDKs for JavaScript and Python. Operating out of European data centers located in Paris, France, Scaleway Generative APIs host open-weight models including gpt-oss, Qwen3, DeepSeek R1, and Gemma 3 with structured outputs, function calling, multimodal processing, and sub-200ms first-token response times. Developers can route inference requests using their Hugging Face tokens or supply direct Scaleway API keys. Billing for routed requests charges standard provider rates starting at €0.20 per million tokens without markups, while direct requests bill to Scaleway accounts. Hugging Face PRO subscribers receive two dollars of monthly inference credits applicable across providers.


### [Public AI on Hugging Face Inference Providers 🔥](https://yomu.fyi/post/public-ai-on-hugging-face-inference-providers.md)
- Company: [Hugging Face](https://yomu.fyi/company/hugging-face.md)
- Author: Joseph Low, Joshua Tan, Célina Hanouti, Julien Chaumond, Simon Brandeis, Lucain Pouget
- Published: Sep 17, 2025
- Type: Announcement

Hugging Face has integrated Public AI as a supported Inference Provider on the Hugging Face Hub. Public AI operates as a nonprofit, open-source project providing access to sovereign and public models from institutions such as the Swiss AI Initiative and AI Singapore. Its distributed infrastructure combines a vLLM-powered backend serving OpenAI-compatible APIs across partner-donated clusters with a global load-balancing routing layer. Users can access these models through the Hugging Face web UI, Python client SDK, and JavaScript SDK using either direct provider API keys or routed Hugging Face tokens. At the time of announcement, inference through the Public AI provider is free of charge, supported by donated GPU time and advertising subsidies.


### [Visible Watermarking with Gradio](https://yomu.fyi/post/visible-watermarking-with-gradio.md)
- Company: [Hugging Face](https://yomu.fyi/company/hugging-face.md)
- Author: Margaret Mitchell
- Published: Sep 15, 2025
- Type: Announcement

Generative artificial intelligence tools produce images, video, audio, and text that have become increasingly difficult to distinguish from real-world media captures. To improve synthetic media transparency, Hugging Face introduced visible watermarking capabilities directly into the Gradio web application framework. Developers can now overlay visual watermarks on image and video outputs by specifying a single watermark parameter using file paths, open image objects, or NumPy arrays. The implementation also supports QR code watermarks, which can match the visual style of generated media while conveying detailed background information. Furthermore, the Gradio Chatbot component accepts a text watermark parameter that automatically attaches attribution metadata whenever users copy generated responses to their clipboards.


### [Tricks from OpenAI gpt-oss YOU 🫵 can use with transformers](https://yomu.fyi/post/tricks-from-openai-gpt-oss-you-can-use-with-transformers.md)
- Company: [Hugging Face](https://yomu.fyi/company/hugging-face.md)
- Author: Aritra Roy Gosthipaty, Sergio Paniego, Vaibhav Srivastav, Pedro Cuenca, Arthur Zucker, Nathan Habib, Cyril Vallez
- Published: Sep 11, 2025
- Type: Announcement

To support OpenAI's GPT-OSS series of models, the transformers library introduced several performance upgrades that apply across supported architectures. The release integrates zero-build custom kernels downloadable directly from the Hub, reducing external dependency bloat and compilation friction for operations like Liger RMSNorm and MegaBlocks MoE. Native support for MXFP4 quantization groups vector elements into 32-value blocks with shared scales, allowing GPT-OSS 20B to fit in roughly 16 GB of VRAM and GPT-OSS 120B in roughly 80 GB. In addition, transformers incorporates Flash Attention 3 with attention sinks, continuous batching via the generate\_batch API for experimentation, and automatic memory pre-allocation to speed up model loading on GPUs.


### [Jupyter Agents: training LLMs to reason with notebooks](https://yomu.fyi/post/jupyter-agents-training-llms-to-reason-with-notebooks.md)
- Company: [Hugging Face](https://yomu.fyi/company/hugging-face.md)
- Author: Baptiste Colle, Hanna Yukhymenko, Leandro von Werra
- Published: Sep 10, 2025
- Type: Problem & solution

Small language models often struggle to compete with large frontier models on complex, agentic data science tasks. To improve notebook-based reasoning, researchers simplified agent scaffolding down to roughly two hundred lines of code with dedicated execution and final answer tools, boosting baseline easy accuracy on the DABStep benchmark from 44.4 percent to 59.7 percent. They constructed a curated training dataset by deduplicating two terabytes of Kaggle notebooks, automatically fetching five terabytes of linked datasets, and scoring educational value and relevance using Qwen3-32B. Question-answer pairs grounded in verified execution traces were generated to fine-tune compact Qwen3-4B thinking and instruct models. The team released the trained models alongside the dataset and execution sandboxes, establishing a foundation for reinforcement learning and distillation on notebook workflows.


### [Welcome EmbeddingGemma, Google's new efficient embedding model](https://yomu.fyi/post/welcome-embeddinggemma-google-s-new-efficient-embedding-model.md)
- Company: [Hugging Face](https://yomu.fyi/company/hugging-face.md)
- Author: Tom Aarsen, Joshua, Alvaro Bartolome, Aritra Roy Gosthipaty, Pedro Cuenca, Sergio Paniego
- Published: Sep 4, 2025
- Type: Announcement

Google DeepMind released EmbeddingGemma, a multilingual embedding model with 308 million parameters and a 2048-token context window designed for on-device applications. Based on the Gemma3 transformer backbone, the architecture replaces causal attention with bidirectional attention to function as an encoder, followed by mean pooling and two dense layers producing 768-dimensional vectors. The model incorporates Matryoshka Representation Learning, allowing outputs to be truncated down to 512, 256, or 128 dimensions for reduced memory and storage footprints. Trained on approximately 320 billion multilingual tokens across more than 100 languages, the quantized model operates under 200 MB of RAM. In domain-specific evaluations on the MIRIAD dataset, fine-tuning increased NDCG@10 from 0.8340 to 0.8862, outperforming larger baselines.


### [SAIR: Accelerating Pharma R&D with AI-Powered Structural Intelligence](https://yomu.fyi/post/sair-accelerating-pharma-r-d-with-ai-powered-structural-intelligence.md)
- Company: [Hugging Face](https://yomu.fyi/company/hugging-face.md)
- Author: Arman Zaribafiyan, Georgia Channing, Rudi Plesch, Zane Beckwith
- Published: Sep 2, 2025
- Type: Announcement

SandboxAQ released the Structurally Augmented IC50 Repository (SAIR), an open-source dataset containing 5.24 million computationally co-folded 3D protein-ligand structures paired with empirical IC50 binding potency data. The repository addresses training data scarcity in structure-based drug discovery, where over 40 percent of the included target proteins lack experimental structures in the Protein Data Bank. To construct the dataset, engineers executed over 130,000 GPU hours of the Boltz1 co-folding model on 760 NVIDIA H100 processors hosted via NVIDIA DGX Cloud on Google Cloud Platform. Infrastructure optimizations maintained over 95 percent GPU compute utilization, compressing the generation timeline from three months to three weeks. Quality validation using PoseBusters confirmed that 97 percent of the predicted complexes met physical plausibility and chemical sanity standards.


### [Building Data-Aware AI Applications with Heroku AI and LlamaIndex](https://yomu.fyi/post/building-data-aware-ai-applications-with-heroku-ai-and-llamaindex.md)
- Company: [Heroku](https://yomu.fyi/company/heroku.md)
- Author: Anush DSouza
- Published: Aug 19, 2025
- Type: Tutorial

Organizations building AI applications over private data must connect large language models with proprietary datasets without managing every infrastructure component. The post presents Heroku Managed Inference and Agents with LlamaIndex as a stack for retrieval-augmented generation (RAG), combining LlamaHub connectors, indexing, retrieval, and managed model services. The implementation provisions Heroku Postgres with pgvector, Claude 4 Sonnet for inference, and Cohere Embed Multilingual embeddings, then uses Python and LlamaIndex to load documents, store 1,024-dimensional vectors, and query them through an OpenAI-compatible embedding endpoint. PGVectorStore supplies the vector store, while Heroku environment variables provide service credentials and connection details. The result is a deployable pattern for querying private documents, with examples spanning financial analysis, insurance claims, customer support, and internal knowledge.


### [Guardrails for money movement: Integrating Stripe MCP with Portia AI](https://yomu.fyi/post/guardrails-for-money-movement-integrating-stripe-mcp-with-portia-ai.md)
- Company: [Stripe](https://yomu.fyi/company/stripe.md)
- Author: Mounir Mouawad
- Published: Aug 13, 2025
- Type: Tutorial

Portia AI presents a customer-refund agent that combines its guardrails with Stripe’s official Model Context Protocol server. The agent reads a refund request, compares it with a policy file, identifies the relevant Stripe customer and payment intent, and evaluates whether the request should be approved. Portia’s planner produces a multi-agent plan, while execution agents run it and persist outputs in plan state; an execution hook pauses before the Stripe create-refund call. A clarification presents the request and the agent’s rationale to a human, who can approve it in the CLI; approval allows the refund to proceed, while rejection exits without creating one. The example also handles Gmail OAuth and can send the customer an email describing the outcome.


### [Heroku AppLink: Extend Salesforce with Any Programming Language](https://yomu.fyi/post/heroku-applink-extend-salesforce-with-any-programming-language.md)
- Company: [Heroku](https://yomu.fyi/company/heroku.md)
- Author: Vivek Viswanathan
- Published: Jul 17, 2025
- Type: Announcement

Heroku AppLink is now generally available from the Salesforce Setup menu, extending Salesforce with Heroku applications and code written in virtually any programming language. The initial release provides SDK support for Node.js and Python, while Java examples and direct AppLink API access demonstrate how other languages can integrate; the APIs provide authentication, authorization, connection pooling, and access to Salesforce and Data Cloud data. AppLink combines an add-on, service-mesh buildpack, dashboard, CLI, API, SDK, OpenAPI integration, and Salesforce API integration to provision connections, restrict and authenticate requests, publish services, and monitor org integrations. The add-on is free, with normal Heroku billing for compute and data resources, and published applications can extend Flow, Apex, and Agentforce while user mode is enabled by default.


### [DispatchGym: Grab’s reinforcement learning research framework](https://yomu.fyi/post/dispatchgym-grab-s-reinforcement-learning-research-framework.md)
- Company: [Grab](https://yomu.fyi/company/grab.md)
- Author: Tan Sien Yi
- Published: Jul 7, 2025
- Type: Explainer

DispatchGym is a research framework for reinforcement learning (RL) studies in dispatch systems that match bookings with drivers. It combines an RL algorithm, a dispatch-process simulation, and a Gymnasium API interface, allowing data scientists with basic RL and Python skills to modify and test ideas independently. The simulated environment models booking creation, driver dispatch and movement, and booking completion, prioritizing directional accuracy over exact metric matching; its modular Python architecture uses Numba to reduce runtime overhead. A command-line upload launches the modified code on internal infrastructure as a Spark job, avoiding infrastructure management while preserving flexibility across simulation and optimization components. The framework supported experiments with contextual bandits, including linear, neural-linear, and Gaussian-process variants alongside several action-sampling strategies, to identify combinations of levers and reward functions for dispatch hyperparameter tuning and improved fulfilment efficiency and reliability.


### [Local Speed, Smooth Deploys: Heroku Adds Support for uv](https://yomu.fyi/post/local-speed-smooth-deploys-heroku-adds-support-for-uv.md)
- Company: [Heroku](https://yomu.fyi/company/heroku.md)
- Author: Ken W. Alger
- Published: Jun 4, 2025
- Type: Announcement

Heroku now natively supports uv, a Rust-written Python package manager presented as a faster alternative to pip for dependency resolution, installation, and virtual-environment management. The post connects this support to recurring problems in modern Python projects, including slow installs, complex dependency trees, version pinning, and tooling that may struggle to keep pace with current standards. It walks through installing uv, running uv init, adding Flask and Gunicorn with uv add, and deploying a basic Flask application using a Procfile, pyproject.toml, uv.lock, and .python-version. Heroku detects the Python app, installs dependencies from these project files, and starts it with gunicorn main:app after a Git push. The stated outcome is faster local development, more consistent environments, reduced onboarding time, fewer flaky builds, and improved pipeline performance, while uv remains relatively new.


### [Building Ramp's MCP server](https://yomu.fyi/post/building-ramp-s-mcp-server.md)
- Company: [Ramp](https://yomu.fyi/company/ramp.md)
- Author: Junho Choi
- Published: Mar 25, 2025
- Type: Explainer

Ramp built an open-source MCP server that exposes its developer API to LLMs through tools and a SQL interface, enabling natural-language access to business spend data. Using FastMCP in Python and Claude Desktop, the prototype could run analyses, generate visualizations, and issue cards on demand, but pagination struggled beyond a few hundred transactions because of miscalculations, context limits, input sizes, and token use. The team replaced bulk responses with an in-memory ETL that flattens API JSON into SQLite, then exposes load, transformation, and query tools; an OLAP-powered API was added for reporting workloads that caused timeouts. This let Claude analyze tens of thousands of spend events with aggregate and window functions while reducing token usage, although API latency, occasional reliability problems, tool-selection errors, and security risks remain; audit logs, OAuth scopes, and constrained tools provide mitigations, while write actions await a safety framework.


### [Unlocking powerful analytics with Stripe Data Pipeline and Google BigQuery](https://yomu.fyi/post/unlocking-powerful-analytics-with-stripe-data-pipeline-and-google-bigq.md)
- Company: [Stripe](https://yomu.fyi/company/stripe.md)
- Author: Sushant Jain
- Published: Mar 21, 2025
- Type: Tutorial

As businesses scale, the post addresses the need to move Stripe revenue data into BigQuery for recurring reporting and analysis. It describes configuring Stripe Data Pipeline to export transactions, invoices, subscriptions, and payments to Google Cloud Storage, then using a Python-based Google Cloud Run Job to discover the latest snapshot through data\_load\_times.json and enumerate each table’s Parquet files. The loader sends those files to BigQuery with the Google Cloud clients, creates missing tables, uses WRITE\_TRUNCATE to retain the latest snapshot, and parallelizes table loads with ThreadPoolExecutor while collecting errors. After deployment and a test execution, the workflow is verified in BigQuery and scheduled to run every six hours, providing an automated path to refreshed Stripe data for analytics.


[Newer posts](https://yomu.fyi/topic/python/page/6.md) · [Older posts](https://yomu.fyi/topic/python/page/8.md)
