diff --git a/Makefile b/Makefile index 241369648..9e71b6a05 100644 --- a/Makefile +++ b/Makefile @@ -777,7 +777,7 @@ simple: examples/simple/simple.cpp ggml.o llama.o $(C $(CXX) $(CXXFLAGS) -c $< -o $(call GET_OBJ_FILE, $<) $(CXX) $(CXXFLAGS) $(filter-out %.h $<,$^) $(call GET_OBJ_FILE, $<) -o $@ $(LDFLAGS) -simple: examples/duo/duo.cpp ggml.o llama.o $(COMMON_DEPS) $(OBJS) +duo: examples/duo/duo.cpp ggml.o llama.o $(COMMON_DEPS) $(OBJS) $(CXX) $(CXXFLAGS) -c $< -o $(call GET_OBJ_FILE, $<) $(CXX) $(CXXFLAGS) $(filter-out %.h $<,$^) $(call GET_OBJ_FILE, $<) -o $@ $(LDFLAGS) diff --git a/examples/duo/duo.cpp b/examples/duo/duo.cpp index 1250db018..ab66bcd0f 100644 --- a/examples/duo/duo.cpp +++ b/examples/duo/duo.cpp @@ -59,7 +59,7 @@ static void split_done_cb(int split) if (split == 1 || split == 2) { std::lock_guard guard(spec_ctx.mtx); - spec_ctx.active_id = 2 - split; + spec_ctx.active_id = split - 1; } } @@ -387,4 +387,4 @@ int main(int argc, char ** argv) { llama_backend_free(); return 0; -} \ No newline at end of file +}