Hacker Newsnew | past | comments | ask | show | jobs | submit | TarqDirtyToMe's commentslogin

Cool to hear Claude was able to learn it. I was planning on leveraging it in a future version of this project I was hacking on that lets you execute shortcut actions as tools (without creating actual shortcuts): https://tarq.net/posts/action-relay-shortcut-actions-mcp/

They aren’t the same thing. TUI refers to interactive ncurses-like interfaces. Vim has a TUI, ls does not

I’m fairly certain this terminology has been around since at least the early aughts.


I would think you’d need to unescape the new lines and tabs and have a task for the model to perform with it.

Maybe try prefixing it with “summarize the following text” before compression.

Otherwise I’m not sure how it would judge what it’s important. Honestly I’m not sure what ChatGPT would do if you copied the text from this page uncompressed without asking it do something

Edit: pasting uncompressed it summarizes the discussion.

I think this solution isn’t well suited for this kind of task. It seems like you’d want to compress instructions, system prompts and memory. With a big block of text with no prior context you’re essentially relying on the smaller model to decide what’s important without enough information to judge.

Worth some more experimentation for sure


Sounds right to me. I think it’s fun that is this may be the only compression algorithm where the output is still human understandable.

It reads like a slightly garbled version of what someone writing down bullet point notes of a lecture might write.

It’s so rare that the human optimized and machine optimized versions of an input are so similar


Is there a text file with many input/output pairs? I couldn't find it in the readme

The examples folder contain jupyter notebooks, there's also some videos and papers, while I just want to see an example text compressed


There’s some examples on the website: https://llmlingua.com/


I think alignment in this context refers to distribution alignment: “aligning” it so its outputs more efficiently steer the target model with less tokens


LLMLingua uses a well-trained small language model after alignment, such as GPT2-small or LLaMA-7B, to detect the unimportant tokens in the prompt and enable inference with the compressed prompt in black-box LLMs, achieving up to 20x compression with minimal performance loss.


“Why waste time say lot word when few word do trick” -Kevin Malone


Perfection. Key insight. "Few Word [is] All Need" (with a robust enough foundation model)

Linked for the culture: https://www.youtube.com/watch?v=bctjSvn-OC8&t=4s

Sleep big last night


"Kevin, are you saying 'See the World' or Sea World?" -- Jim


What would happen if instead of the long prompt, you just sent the mean of the embeddings of the prompt tokens?


Came here to mention this. Whenever I hear "alignment" I immediately say "No way am I going to use that shit". Seriously, there's alignment and then there's censorship—the AI creators are using the former when they actually mean the latter. This needs to stop.


My understanding is that in an academic context you’ll hear alignment anytime a model is tuned to accomplish a certain task, not just to steer its political affiliation and idea of ethics

I don’t think this models use of alignment implies any sort of censorship, it’s just being tuned to accomplish the task of outputting only important tokens for the target llm


In my experience it means the AI will waste tokens apologizing for it's short comings and ignoring task prompts in favour of it's alignment.


This does not seem relevant to the alignment discussed in the paper. It seems to be explicitly out of scope:

> The potential harmful, false or biased responses using the compressed prompts would likely be unchanged. Thus using LLMLingua has no inherent benefits or risks when it comes to those types of responsible AI issues.


[flagged]


I’m really not all that familiar with the space so I could be mistaking. The definition of ai alignment on Wikipedia says an aligned model one that “advances intended objectives”.

In the paper, “distribution alignment” is one of methods used to improve the results of compression so intent is preserved:

> To narrow the gap between the distribution of the LLM and that of the small language model used for prompt compression, here we align the two distributions via instruction tuning

So in any case for this paper alignment seems to be used in very specific way that doesn’t seem related to censorship

Edit: would to love to hear from someone who has a better understanding of the paper to clarify. I am operating from the position of layman here


It is common, standard usage precisely in this context.


It amazes me that this amazing new technology comes out and there is a group of people who are like "NO, NOT IF IT CAN'T TELL RACIST JOKES!"

I agree that like "tone" alignment is silly and pointless for models in the public domain, but if I were a big company who wanted to keep customers I'd align my models this way. It isn't censorship, its marketing.


I'd be interested to see if any web-based control panels are vulnerable in a similar way. All of the client_*_temp_path directives are valid in http,server, and location contexts so you have a lot of flexibility there.


All of the client_*_temp_path behave this way so you can actually change multiple files with one payload.

I am sure there are other ones but I have not had a chance to investigate further. Another commented mentioned this particular problem is in ngx_create_paths so that would be a good place to start looking.

The key is to find paths that happen in the master process, not the workers.


In theory, to make the temp/cache directories more secure I imagine


This would make sense if it created those directories, but IMHO it should fail to start if the path exists and isn't owned by www process. The function that does chown() is even called ngx_create_paths().


I agreed, would at least consider it a bug if not a security issue.


Definitely bad behavior. Ideally, no one but privileged users should be able to edit the configuration imho but this opens the door for attackers.


Completely agree. Time for a PR?


Trust me, I was just surprised as you are when I saw tutorials suggesting this.


Because nginx AFAIK does not have something like Apache's .htaccess.

Yes, htaccess is ugly but at least a server operator can restrict the users from pwning the machine and only allow rewrite-configs.


That is exactly the reason. and is the main difference between Apache mode and Nginx mode in W3TC. The plugin needs to be able to create URL rewriting rules on the fly, and nginx gives them no sane way to do it.

Htaccess sucks for various reasons, but most of the suck can be worked around.


What exactly does it do on the fly? Unless the plugin is running under the same user as nginx's master process, which is usually root, it won't be able to send SIGHUP to the master process and reload nginx.conf. So, nothing can be on the fly here, it's probably just one of those fancy ways to make plugin installation "easier" and create configs on behalf of the user.

Also, there is no reason to start nginx under root on linux, just give the binary required net bind capability and start under normal user.


Usually in many simple hosting setups (where W3TC is common) the reloading of nginx is left to a cron job at some set interval.

Other plugins like iThemes Security will populate the nginx.conf with banned IP and the such, so it can update on a fairly regular basis.


nginx map files are a sane and fast way to create URL rewriting rules.

http://serverfault.com/questions/441235/maintaining-redirect...


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: