Skip to content

Commit cb5bb45

Browse files
committed
llama: remove diffusion functions
1 parent efef0a3 commit cb5bb45

File tree

1 file changed

+0
-43
lines changed

1 file changed

+0
-43
lines changed

include/llama.h

Lines changed: 0 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -203,15 +203,6 @@ extern "C" {
203203

204204
typedef bool (*llama_progress_callback)(float progress, void * user_data);
205205

206-
// Diffusion step callback - called after each diffusion step
207-
// step: current step number (0-based)
208-
// total_steps: total number of diffusion steps
209-
// tokens: current token array state
210-
// n_tokens: number of tokens in the array
211-
// user_data: user-provided context data
212-
// Returns: true to continue, false to cancel
213-
typedef bool (*llama_diffusion_step_callback)(int32_t step, int32_t total_steps, const llama_token * tokens, int32_t n_tokens, void * user_data);
214-
215206
// Input data for llama_encode/llama_decode
216207
// A llama_batch object can contain input about one or many sequences
217208
// The provided arrays (i.e. token, embd, pos, etc.) must have size of n_tokens
@@ -925,40 +916,6 @@ extern "C" {
925916
struct llama_context * ctx,
926917
struct llama_batch batch);
927918

928-
// Diffusion generation parameters for Dream7B models
929-
typedef struct llama_diffusion_params {
930-
int32_t steps; // number of diffusion steps (default: 512)
931-
float eps; // epsilon for timesteps (default: 1e-3f)
932-
float temperature; // sampling temperature (default: 0.0f)
933-
float top_p; // top-p sampling (default: 1.0f)
934-
int32_t top_k; // top-k sampling (default: 0 = disabled)
935-
llama_token mask_token_id; // mask token id
936-
enum {
937-
LLAMA_DIFFUSION_ALG_ORIGIN = 0,
938-
LLAMA_DIFFUSION_ALG_MASKGIT_PLUS = 1,
939-
LLAMA_DIFFUSION_ALG_TOPK_MARGIN = 2,
940-
LLAMA_DIFFUSION_ALG_ENTROPY = 3,
941-
} algorithm; // diffusion algorithm (default: ORIGIN)
942-
float alg_temp; // algorithm temperature (default: 0.0f)
943-
int32_t seed; // seed for random number generator (default: 0)
944-
llama_diffusion_step_callback step_callback; // called after each diffusion step
945-
void * step_callback_user_data; // user data for step callback
946-
} llama_diffusion_params;
947-
948-
// Get default diffusion parameters
949-
LLAMA_API struct llama_diffusion_params llama_diffusion_default_params(void);
950-
951-
// Diffusion generation for Dream7B models
952-
// Returns the generated tokens, or NULL on error
953-
// The caller is responsible for freeing the returned array
954-
LLAMA_API llama_token * llama_diffusion_generate(
955-
struct llama_context * ctx,
956-
const llama_token * input_tokens,
957-
int32_t n_input,
958-
int32_t max_length,
959-
struct llama_diffusion_params params,
960-
int32_t * n_generated);
961-
962919
// Set the number of threads used for decoding
963920
// n_threads is the number of threads used for generation (single token)
964921
// n_threads_batch is the number of threads used for prompt and batch processing (multiple tokens)

0 commit comments

Comments
 (0)