Live data from Hacker News

Reader-LM: Small Language Models for Cleaning and Converting HTML to Markdown

jina.ai

31–40 of 49 posts

Re: Reader-LM: Small Language Models for Cleaning and Converting HTML to Markdown

#31

For as much as I would love for this to work, I'm not getting great results trying out the 1.5b model in their example notebook on Colab. It is impressively fast, but testing it on an arxiv.org page (specifically https://arxiv.org/abs/2306.03872 ) only gives me a short markdown file containing the abstract, the "View PDF" link and the submission history. It completely leaves out the title (!), authors and other links…

Question is why even use these small models? When you've Google Flash which is lightening fast and cheap. My brother implemented it in option-k : https://github.com/zerocorebeta/Option-K It's near instant. So why waste time on small models? It's going to cost more than Google flash.

What is Google Flash? Do you mean Gemini Flash? If so, then the article talks about that general purpose LLMs are worse than this specialized LLM for Markdown conversion.

Re: Reader-LM: Small Language Models for Cleaning and Converting HTML to Markdown

#32

For as much as I would love for this to work, I'm not getting great results trying out the 1.5b model in their example notebook on Colab. It is impressively fast, but testing it on an arxiv.org page (specifically https://arxiv.org/abs/2306.03872 ) only gives me a short markdown file containing the abstract, the "View PDF" link and the submission history. It completely leaves out the title (!), authors and other links…

Question is why even use these small models? When you've Google Flash which is lightening fast and cheap. My brother implemented it in option-k : https://github.com/zerocorebeta/Option-K It's near instant. So why waste time on small models? It's going to cost more than Google flash.

Sometimes you don’t want to share all your data with the largest corporations on the planet.

Re: Reader-LM: Small Language Models for Cleaning and Converting HTML to Markdown

#33
post #27

Unfortunately not getting any good results for RFC 3339 ( https://www.rfc-editor.org/rfc/rfc3339 ), such a page where I think it would be great to convert text into readable Markdown. The end result is just like the original site but with without any headings and the a lot of whitespace still remaining (but with some non-working links inserted) :/ Using thei API link, this is what it looks like: https://r.jina.ai/htt…

Tested it using the model in Google Colab and it did ok, but the output is truncated at the following line:

> [Appendix B](#appendix-B). Day

So not sure if it's the length of the page, or something else, but in the end, it doesn't really work?

Re: Reader-LM: Small Language Models for Cleaning and Converting HTML to Markdown

#34

For as much as I would love for this to work, I'm not getting great results trying out the 1.5b model in their example notebook on Colab. It is impressively fast, but testing it on an arxiv.org page (specifically https://arxiv.org/abs/2306.03872 ) only gives me a short markdown file containing the abstract, the "View PDF" link and the submission history. It completely leaves out the title (!), authors and other links…

Question is why even use these small models? When you've Google Flash which is lightening fast and cheap. My brother implemented it in option-k : https://github.com/zerocorebeta/Option-K It's near instant. So why waste time on small models? It's going to cost more than Google flash.

[deleted]

Re: Reader-LM: Small Language Models for Cleaning and Converting HTML to Markdown

#35

For as much as I would love for this to work, I'm not getting great results trying out the 1.5b model in their example notebook on Colab. It is impressively fast, but testing it on an arxiv.org page (specifically https://arxiv.org/abs/2306.03872 ) only gives me a short markdown file containing the abstract, the "View PDF" link and the submission history. It completely leaves out the title (!), authors and other links…

Question is why even use these small models? When you've Google Flash which is lightening fast and cheap. My brother implemented it in option-k : https://github.com/zerocorebeta/Option-K It's near instant. So why waste time on small models? It's going to cost more than Google flash.

Small models often do a much better job when you have a well-defined task.

Re: Reader-LM: Small Language Models for Cleaning and Converting HTML to Markdown

#36
post #4

Earlier quoted context omitted.

There’s html and then there’s… html. A nicely formatted subset of html is very different from a dom tag soup that is more or less the default nowadays.

Tag soup hasn’t been a problem for years. The HTML 5 specification goes into a lot more detail than previous specifications when it comes to parsing malformed markup and browsers follow it. So no matter the quality of the markup, if you throw it at any HTML 5 implementation, you will get the same consistent, unambiguous DOM structure.

yeah, you could just pull the parser out of any open source browser and voila a parser not only battle-tested, but probably the one the page was developed against

Re: Reader-LM: Small Language Models for Cleaning and Converting HTML to Markdown

#37
post #4

Earlier quoted context omitted.

There’s html and then there’s… html. A nicely formatted subset of html is very different from a dom tag soup that is more or less the default nowadays.

That's why the best strategy is to feed the whole page into LLM. (After removing html tags) and just ask LLM to give you the date you need in the format you need. If there is lots of javascript dom manipulation happening after pageload. Then just render in webdriver and screenshot, ocr and feed the result into LLM and ask it the right questions.

My intuition is that you’d get better results emptying the tags or replacing them with some other delimiter.

Keep the structural hint, remove the noise.

Re: Reader-LM: Small Language Models for Cleaning and Converting HTML to Markdown

#38
post #31

Earlier quoted context omitted.

Question is why even use these small models? When you've Google Flash which is lightening fast and cheap. My brother implemented it in option-k : https://github.com/zerocorebeta/Option-K It's near instant. So why waste time on small models? It's going to cost more than Google flash.

What is Google Flash? Do you mean Gemini Flash? If so, then the article talks about that general purpose LLMs are worse than this specialized LLM for Markdown conversion.

In this case it is not, though. As much as I'd like a self-hostable, cheap and lean model for this specific task, instead we have a completely inflexible model that I can't just prompt tweak to behave better in even not-so-special cases like above.

I'm sure there are good examples of specialised LLMs that do work well (like ones that are trained on specific sciences), but here the model doesn't have enough language comprehension to understand plain English instructions. How do I tweak it without fine-tuning? With a traditional approach to scraping this is trivial, but here it's unfeasible to the end user.

Post reply on HN