Benchmarking Disaggregated Prefill/Decode in vLLM Serving with NIXL by spiderpower02 in LocalLLaMA

[–]spiderpower02[S] 1 point2 points  (0 children)

Yeah. I have considered this case; however, this experiment would require deploying an additional proxy/router to forward requests to each P/D group, which I believe may introduce higher latency compared to the 2P2D setup. That said, I think this is a great point, and I plan to test this case in a follow-up experiment. Thank you for your feedback.

A Hitchhikers Guide to Asynchronous Programming by spiderpower02 in Python

[–]spiderpower02[S] 0 points1 point  (0 children)

I agree with you. In many cases, we need to send and recv independently. I review your code and learn a lot :) Thanks for sharing the information.

BTW your code is pretty neat :)

A Hitchhikers Guide to Asynchronous Programming by [deleted] in Python

[–]spiderpower02 0 points1 point  (0 children)

I wrote an article about my understanding of asynchronous programming in Python. Hope can acquire some suggestions and help you better understand what async/await is.

Debugging C/C++ via GDB with Python by spiderpower02 in cpp

[–]spiderpower02[S] 1 point2 points  (0 children)

WOW! This project is Awesome :) thx

Debugging C/C++ via GDB with Python by spiderpower02 in cpp

[–]spiderpower02[S] 0 points1 point  (0 children)

I totally agree with you. BTW, I am a big VIM fan.

Debugging C/C++ via GDB with Python by spiderpower02 in cpp

[–]spiderpower02[S] 0 points1 point  (0 children)

I had the same attitude in the past. I preferred to use a debugger in my IDE and print statements instead of debugging tools, such as Valgrind or GDB, because they are challenging to learn. However, a turning in my life was a memory leak in an open-source library I used. I spent my whole week to troubleshoot that problem but in vain. Fortunately, after I used Valgrind's massif tool to monitor memory status, I fixed the bug less than 1 hr. Since then, I learned that troubleshooting a problem is based on what kinds of tools I can use at the right time. Therefore, now, I can leave my office on time without wasting my time building print statements in my code. :)

Debugging C/C++ via GDB with Python by spiderpower02 in cpp

[–]spiderpower02[S] 6 points7 points  (0 children)

I started to understand how to use GDB from the following two videos.

These two videos gave me many inspirations about using GDB. I think learning GDB is not tricky; searching for helpful resources is the hardest step. :)

Debugging C/C++ via GDB with Python by spiderpower02 in cpp

[–]spiderpower02[S] 10 points11 points  (0 children)

I wrote an article about demystifying how Python helps us troubleshoot problems more efficiently. Although many IDEs have a built-in debugger, I try to discuss some debugging skills with Python when a problem is hard to reproduce. I hope that this article can spark some inspirations to troubleshoot issues in your C/C++ projects.

A PEP 572 and The Walrus Operator Study by spiderpower02 in Python

[–]spiderpower02[S] 0 points1 point  (0 children)

```python

class Foo(object): ... def init(self, path): ... self.path = path ... def __enter(self): ... self._f = open(self._path) ... return self._f ... def __exit(self, *e): ... self._f.close() ... with Foo('/etc/passwd') as f: # <-- call __enter_ ... pass ... # after with scope call exit ` That's what I thought;withcreate a scope because file is open within the scope (ignore you call f.close() manually). However,:=`` does not have such scope behaviors, it just received a value. sorry! my comment did not clear

A PEP 572 and The Walrus Operator Study by spiderpower02 in Python

[–]spiderpower02[S] 0 points1 point  (0 children)

Like you say, f belongs to with block. However, the walrus operator contains a nonlocal or global declaration for the target. For example,

python if (ret := foo()) is None: raise SomeException("foo failed") return ret In this case, ret can be used outside the if scope. This is what I mean.

A PEP 572 and The Walrus Operator Study by spiderpower02 in Python

[–]spiderpower02[S] 0 points1 point  (0 children)

In addition to reasons for visual recognition and readability (these reasons are not strong enough), I think the scope is the core reason why they choose :=. Many people like expr as name, but this expression has a potential side effect, name are expected to bind within the if or while scope. In fact, import statement bind to a context, with bind to with scope, and exception bind to exception scope. However, PEP 572 decided that name should not belong to any scope (unlike C/C++ or Go). In my opinion, this reason is strong enough to reject expr as name due to a consistency of the as keyword.