mirror of
https://github.com/iafiscal1212/diffuse-cpp.git
synced 2026-12-04 00:28:08 +00:00
- Project structure with CMake build system, GGML submodule - Core library: model loader (GGUF), transformer forward pass, diffusion sampler - CLI tools: diffuse-cli (generation) and diffuse-bench (benchmarks) - Converter: convert-llada.py (SafeTensors → GGUF with tensor name mapping) - Tests: unit tests, converter roundtrip test, end-to-end forward pass test - Bidirectional attention (no causal mask, no KV cache) - SwiGLU FFN, RoPE, RMSNorm — full LLaDA-8B Llama backbone - Verified: compiles clean, forward pass produces valid logits on tiny model Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
12 lines
320 B
C
12 lines
320 B
C
#pragma once
|
|
|
|
#include "diffuse-common.h"
|
|
|
|
// Build the full transformer forward pass as a GGML computation graph.
|
|
// Returns the logits tensor [n_tokens, n_vocab].
|
|
struct ggml_cgraph * diffuse_build_graph(
|
|
diffuse_context * ctx,
|
|
struct ggml_context * ctx_compute,
|
|
const int32_t * tokens,
|
|
int n_tokens);
|