A .NET 10 / C# library and CLI for compressing LLaMA-family LLMs. Reimplements llm-compressor on TorchSharp.
C#
0
136 commits
updated May 18, 2026
A .NET 10 / C# library and CLI for compressing LLaMA-family large language models. Reimplements the core algorithms from the Python llm-compressor project on top of TorchSharp.
Status: Phase 0 — repo bootstrap. APIs are not stable until v1.0.
compressed-tensors config (vLLM-compatible) and ONNX (pure .NET export).dnx llmc compress ...dotnet tool install -g LLMCompressorSharp
dnx llmc compress \
--model HuggingFaceTB/SmolLM2-135M-Instruct \
--recipe gptq-w4a16 \
--output ./compressed
src/
LLMCompressorSharp.TorchExtensions/ TorchSharp gap-fillers
LLMCompressorSharp.Core/ Modifiers, observers, recipes
LLMCompressorSharp.Transformers/ LLaMA architecture, HF loader
LLMCompressorSharp.Cli/ The `llmc` tool
tests/
LLMCompressorSharp.Tests/
docs/ Research notes and design
dotnet build LLMCompressorSharp.slnx
dotnet test LLMCompressorSharp.slnx
Requires .NET 10 SDK. CPU-only build works on any platform; CUDA-accelerated
compression requires a Windows or Linux machine with an NVIDIA GPU and the
relevant TorchSharp-cuda-* package referenced at deploy time.
docs/INDEX.md — research notes (llm-compressor, .NET 10, TorchSharp)docs/superpowers/specs/2026-05-15-llmcompressorsharp-design.md — design specPR_TO_TORCHSHARP.md — upstream contribution trackerApache-2.0.
C#
99.1%
A .NET 10 / C# library and CLI for compressing LLaMA-family LLMs. Reimplements llm-compressor on TorchSharp.
C#
0
136 commits
updated May 18, 2026
A .NET 10 / C# library and CLI for compressing LLaMA-family large language models. Reimplements the core algorithms from the Python llm-compressor project on top of TorchSharp.
Status: Phase 0 — repo bootstrap. APIs are not stable until v1.0.
compressed-tensors config (vLLM-compatible) and ONNX (pure .NET export).dnx llmc compress ...dotnet tool install -g LLMCompressorSharp
dnx llmc compress \
--model HuggingFaceTB/SmolLM2-135M-Instruct \
--recipe gptq-w4a16 \
--output ./compressed
src/
LLMCompressorSharp.TorchExtensions/ TorchSharp gap-fillers
LLMCompressorSharp.Core/ Modifiers, observers, recipes
LLMCompressorSharp.Transformers/ LLaMA architecture, HF loader
LLMCompressorSharp.Cli/ The `llmc` tool
tests/
LLMCompressorSharp.Tests/
docs/ Research notes and design
dotnet build LLMCompressorSharp.slnx
dotnet test LLMCompressorSharp.slnx
Requires .NET 10 SDK. CPU-only build works on any platform; CUDA-accelerated
compression requires a Windows or Linux machine with an NVIDIA GPU and the
relevant TorchSharp-cuda-* package referenced at deploy time.
docs/INDEX.md — research notes (llm-compressor, .NET 10, TorchSharp)docs/superpowers/specs/2026-05-15-llmcompressorsharp-design.md — design specPR_TO_TORCHSHARP.md — upstream contribution trackerApache-2.0.
C#
99.1%