Better HN
topnewbestaskshowjobs
Log inSign up

ju-bezdek

5 karma · joined Mar 1, 2022 (4y ago) · 8 submissions

Submissions

comment 1y ago · link · parent

I’ve been working with LLMs a lot lately, and one consistent UX bottleneck is inference speed.

Many tasks follow this pattern: process small chunks → batch for inference → split results again. Parallelizing helps, but naive asyncio.gather approaches often backfire—each stage waits on the slowest batch, killing responsiveness. Mixing fast per-item logic with slower batch steps needs smarter coordination.

Technical approach: Built a pipeline library that handles the streaming coordination automatically. Uses async generators throughout with intelligent queuing for order preservation when needed.

Architecture decisions:

Stream-first design: Results flow by default, with optional collection Flexible ordering: Choose between speed (unordered) and sequence (ordered) Memory efficiency: O(batch_size) memory usage, not O(dataset_size) Backpressure handling: Automatic coordination between fast and slow stages Error boundaries: Configurable failure strategies at task level.

2.

I've built an open source streaming library for async pipelines(github.com ↗)

1 points · by ju-bezdek · 1y ago · 1 comment

comment 3y ago · link · parent

Hi folks... wanted to share a little pet project of mine ... LangChain Decorators adds syntactic sugar for langchain Main principles and benefits:

- more pythonic way of writing code - write multiline prompts that won't break your code flow with indentation - making use of IDE in-built support for hinting, type checking, and popup with docs to quickly peek in the function to see the prompt, parameters it consumes etc. - leverage all the power of ' LangChain ecosystem - adding support for optional parameters easily share parameters between the prompts by binding them to one class

How it works...

tl;dr;

just write declare a function and write your prompt template as python docstring...

for example:

@llm_prompt def write_me_short_post(topic:str, platform:str="twitter", audience:str = "developers")->str: """ Write me a short header for my post about {topic} for {platform} platform. It should be for {audience} audience. (Max 15 words) """ return

it'will turn the function into an executable chain all the other settings are considered as an implementation detail and as such you can define them elsewhere (and/or override them in decorator params)

4.

LangChain Decorators – syntactic sugar for langchain(github.com ↗)

2 points · by ju-bezdek · 3y ago · 2 comments

5.

Show HN: Unit Tests for LangChain aps in 3 lines of code(docs.promptwatch.io ↗)

1 points · by ju-bezdek · 3y ago · discuss

6.

Show HN: I made PromptWatch – LangChain tracing on steroids(promptwatch.io ↗)

10 points · by ju-bezdek · 3y ago · 1 comment

comment 4y ago · link · parent

OK, and does anyone here knows good alternative for getting early feedback? I was thinking about posting some stories to medium, but it's not really meant as a feedback platform.