Skip to content

Instantly share code, notes, and snippets.

View luisquintanilla's full-sized avatar
🛸
Astral Plane

Luis Quintanilla luisquintanilla

🛸
Astral Plane
View GitHub Profile
@luisquintanilla
luisquintanilla / OrtTensorBridge.cs
Last active September 26, 2026 01:38
ONNX Runtime 1.23.2 + System.Numerics.Tensors 10.0.9: tensor bridge MissingMethodException
#:package System.Numerics.Tensors@10.0.9
#:package Microsoft.ML.OnnxRuntime@1.23.2
#:property TargetFramework=net10.0
#:property PublishAot=false
using System.Numerics.Tensors;
using System.Runtime.CompilerServices;
using Microsoft.ML.OnnxRuntime;
Console.WriteLine($"Runtime: {System.Runtime.InteropServices.RuntimeInformation.FrameworkDescription}");
@luisquintanilla
luisquintanilla / README.md
Last active September 26, 2026 01:38
System.Numerics.Tensors 10.0.9: pinning a contiguous slice starts at the parent array

Tensor slice pinning repro

A contiguous tensor slice returns the expected values through its indexer and tensor span, but its pinning APIs start at the parent array.

I found this while prototyping tensor interoperability for a .NET ONNX text-embedding pipeline. The repro removes ONNX and only uses System.Numerics.Tensors. No model, project file, or other source files are needed.

Run the repro

Download TensorSlicePinning.cs into a new directory outside a repository:

@luisquintanilla
luisquintanilla / Classify.cs
Last active September 25, 2026 20:47
Classify text locally with TensorSharp and a C# file-based app
#:package TensorSharp.Models@2026.9.1
#:property PublishAot=false
using TensorSharp.Models;
using TensorSharp.Runtime;
Environment.SetEnvironmentVariable("MAX_CONTEXT", "512");
using var model = ModelBase.Create("qwen3-0.6b-q4_k_m.gguf", BackendType.Cpu);
var email = "Payroll asks for your password on a non-company sign-in page.";
@luisquintanilla
luisquintanilla / 00-problem-baseline.cs
Created July 1, 2026 00:48
Runnable scope for dotnet/extensions #7516 — MEDI chunk metadata propagation (typed provenance vs loose-dict copy)
// 00-problem-baseline.cs
// SPIKE 0 — Prove or KILL hypothesis H1.
//
// H1: With MEDI PR #7516's current first-wins metadata propagation, a chunk that spans
// multiple source pages produces a WRONG/INCOMPLETE source citation, AND the typed
// PageNumber (the field that actually matters for citation) is dropped entirely.
//
// JTBD under test: "Given a retrieved chunk, what page(s) of the source does it cite?"
// This is the #1 production-RAG requirement (legal/medical/financial attribution).
//
@luisquintanilla
luisquintanilla / AudioTranscriptionGemma3n.ipynb
Last active June 27, 2025 20:29
Gemma3n Audio Transcription Ollama
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@luisquintanilla
luisquintanilla / WheresWaldo.ipynb
Created June 27, 2025 20:02
Where's Waldo? AI Edition
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@luisquintanilla
luisquintanilla / Agent.cs
Last active June 12, 2025 14:46
SK-MEAI-Agent
[Description("Calculate tax given a receipt and tax rate")]
float CalculateTax(float total, float taxRate)
{
return total * (1 + taxRate);
}
ILoggerFactory loggerFactory = LoggerFactory.Create(builder =>
{
builder.SetMinimumLevel(LogLevel.Trace).AddConsole();
});
@luisquintanilla
luisquintanilla / CustomMiddleware.ipynb
Created April 22, 2025 18:55
Custom Middleware MEAI
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@luisquintanilla
luisquintanilla / AnonymousDelegatingChatClient.ipynb
Created March 12, 2025 02:07
Creating custom middleware using MEAI AnonymousDelegatingChatClient
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@luisquintanilla
luisquintanilla / MEAI-SK-Agents.ipynb
Created March 11, 2025 19:45
Using Microsoft.Extensions.AI and Semantic Kernel Agents with GitHub Models
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.