Skip to content

Feat/perf improvements and beyond#47

Merged
wisedev-pstach merged 12 commits intomainfrom
feat/perf_improvements_and_beyond
May 8, 2025
Merged

Feat/perf improvements and beyond#47
wisedev-pstach merged 12 commits intomainfrom
feat/perf_improvements_and_beyond

Conversation

@wisedev-pstach
Copy link
Copy Markdown
Contributor

@wisedev-pstach wisedev-pstach commented May 8, 2025

Mostly performance improvements, with few extensions and helper methods
Also new example (conversation agent) that was helpful while debugging performance and context size changes

@wisedev-pstach wisedev-pstach linked an issue May 8, 2025 that may be closed by this pull request
pswierad-src
pswierad-src previously approved these changes May 8, 2025
Copy link
Copy Markdown
Collaborator

@pswierad-src pswierad-src left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

With suggestions ;)

public bool Translate { get; init; }
public InferenceParamsDocument? InferenceParams { get; init; }
public MemoryParamsDocument? MemoryParams { get; init; }
public object? ConvState { get; init; }
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No explicit type here?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Conversation.State given by LLamaSharp is abstract type, therefore cannot be serialized by itself, we can create our own object type individually for that but atm maybe we dont have enough reason for that imo, atm its object because its easy to store it that way :p


public async Task<Agent> CreateAgent(Agent agent, bool flow = false, bool interactiveResponse = false,
InferenceParams? inferenceParams = null, MemoryParams? memoryParams = null)
InferenceParams? inferenceParams = null, MemoryParams? memoryParams = null, bool useCache = false)
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If the caching is for memory maybe we should default it to true? For sake of backwards compatibility

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fair point, though caching make it more resource heavy, but users now have a choice to disable it at least. I will update thanks!

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

@pswierad-src pswierad-src self-requested a review May 8, 2025 17:51
pswierad-src
pswierad-src previously approved these changes May 8, 2025
@wisedev-pstach wisedev-pstach merged commit f3921c6 into main May 8, 2025
@wisedev-pstach wisedev-pstach deleted the feat/perf_improvements_and_beyond branch August 28, 2025 09:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Performance improvements and beyond

2 participants