How to design an agent that responds to a user based on transactional database data: what stack and architecture are needed, should multi-agent systems be used?
Machine Learning / AI
What inference optimizations for standard LLM can be suggested if the corporate GPT is running slowly?
What is speculative decoding and how does it speed up generation?
What is the dimensionality of the output of an MLP layer?
What is MoE (Mixture of Experts) and why might this architecture be advantageous for inference?
After the attention outputs a vector, what happens next in the Transformer block?
Analyze separately prefill and decode: Q/K/V, matrix forms, and phase differences.
Why should transactional SQL responses not use vector RAG as the main mechanism?
How is the ML/LLM application path generally organized from Dockerfile and source code to deployed service and user traffic in Kubernetes?
Proper bracket sequence Consider a sequence consisting of round, square, and curly brackets '(', ')', '{', '}', '[', ']'. The program should determine whether the given bracket sequence is correct. - An empty sequence is correct. - If A is a correct sequence, then (A), [A], {A} are correct. - If A and B are correct sequences, then AB is correct. Input format: A single line contains a bracket sequence with no more than 100000 brackets. Output format: If the sequence is correct, the program should output 'yes', otherwise 'no'.
After token ID and embeddings, what exactly is fed into the decoder: what is the form of the representations, how is positional information added, and what happens next?
What did you do with compliance in the RAG system?
What do you do with logits before sampling, and what sampling parameters do you know?
What is the Q-vector multiplied by during decode and what is obtained?
What important topics about yourself or your work style would you like to highlight further?
What did you use for cleaning and normalizing documents: Redis or regex?
What IDE or shell do you use for working with AI tools?
Why can quantized LLMs work faster and why does quantization sometimes slow down inference?
import unittest class Solution: def isvalid(self, s:str) -> bool: matching_brackets = { ")": "(", "]": "[", "}": "{", } stack: list[str] = [] for bracket in s: if bracket in "([{": stack.append(bracket) continue if bracket not in matching_brackets: return False if not stack or stack[-1] != matching_brackets[bracket]: return False stack.pop() return not stack class SolutionTest: def __init__(self): self.Solution = Solution() def run(self): test_cases = [ ("", True), ("()", True), ("(){}[]", True), ("(({}))", True), ("(", False), (")", False), ("(((", False), ("{[]}", False), ] for brackets, expected in test_cases: actual = self.Solution.isvalid(brackets) assert actual == expected, ( f"Ошибка для {brackets!r}" f"Хотели получить {expected}, а получили {actual}" ) print(f"Все тесты пройдены: {len(test_cases)}") if __name__ == "__main__": SolutionTest().run()
Какие существуют виды attention, позволяющие избежать квадратичной сложности полного self-attention на длинном контексте?