LAin

not-lain

AI & ML interests

custom AI models with HF integration, multimodal rag and open-source software

Articles

Organizations

not-lain's activity

replied to victor's post about 2 hours ago
posted an update 8 days ago
view post
Post
1662
It is with great pleasure I inform you that huggingface's ModelHubMixin reached 200+ models on the hub ๐Ÿฅณ

ModelHubMixin is a class developed by HF to integrate AI models with the hub with ease and it comes with 3 methods :
* save_pretrained
* from_pretrained
* push_to_hub

Shoutout to @nielsr , @Wauplin and everyone else on HF for their awesome work ๐Ÿค—

If you are not familiar with ModelHubMixin and you are looking for extra resources you might consider :
* docs: https://huggingface.co/docs/huggingface_hub/main/en/package_reference/mixins
๐Ÿ”—blog about training models with the trainer API and using ModelHubMixin: https://huggingface.co/blog/not-lain/trainer-api-and-mixin-classes
๐Ÿ”—GitHub repo with pip integration: https://github.com/not-lain/PyTorchModelHubMixin-template
๐Ÿ”—basic guide: https://huggingface.co/posts/not-lain/884273241241808
replied to m-ric's post 10 days ago
view reply

@m-ric really nice video, also I really loved the blogpost.
Thanks a lot ๐Ÿค—

replied to their post 12 days ago
posted an update 13 days ago
view post
Post
1704
I will be delivering an introductory coding session this Sunday 7Pm gmt+1 time about huggingface, if you are new to HF and don't know where to begin, you are welcome to join us ๐Ÿค—
๐Ÿ“ŒPlace: huggingface discord server
๐Ÿ”—Link : https://discord.gg/hugging-face-879548962464493619?event=1245406127668203541
  • 2 replies
ยท
replied to lunarflu's post 14 days ago
view reply

@lunarflu don't forget HF unwrapped too, similar to what GitHub, Reddit and other websites do, would be fun to have

replied to hakunamatata1997's post 21 days ago
view reply

@hakunamatata1997 , some people (including me) sometimes think that an AI is unfit for public use (for example failing the toxicity test) therefore, it is not recommended to keep them.

posted an update 25 days ago
view post
Post
1476
If you're a researcher or developing your own model ๐Ÿ‘€ you might need to take a look at huggingface's ModelHubMixin classes.
They are used to seamlessly integrate your AI model with huggingface and to save/ load your model easily ๐Ÿš€

1๏ธโƒฃ make sure you're using the appropriate library version
pip install -qU "huggingface_hub>=0.22"

2๏ธโƒฃ inherit from the appropriate class
from huggingface_hub import PyTorchModelHubMixin
from torch import nn

class MyModel(nn.Module,PyTorchModelHubMixin):
  def __init__(self, a, b):
    super().__init__()
    self.layer = nn.Linear(a,b)
  def forward(self,inputs):
    return self.layer(inputs)

first_model = MyModel(3,1)

4๏ธโƒฃ push the model to the hub (or use save_pretrained method to save locally)
first_model.push_to_hub("not-lain/test")

5๏ธโƒฃ Load and initialize the model from the hub using the original class
pretrained_model = MyModel.from_pretrained("not-lain/test")

posted an update 28 days ago
view post
Post
1082
I'm looking for open-source image embedding models for RAG applications and/or multimodel embedding models if they exist in the first place.

if you have any extra resources about using, creating, or finetuning them feel free to share them below ๐Ÿค—
replied to mwz's post 30 days ago
replied to their post about 1 month ago
view reply

thank you sooooo much โค๏ธโค๏ธ

posted an update about 1 month ago
view post
Post
1183
๐Ÿฅณcelebrating 5K readers in one of my blog posts ๐Ÿฅณ
I came back with another one this time ๐Ÿค“
in this blog you will learn ๐Ÿ“– :
* How to train custom AI models with the trainer API ๐Ÿš€
* integrate your AI models with HF using the mixin classes ๐Ÿ”ฅ

happy reading everyone ๐Ÿค—
๐Ÿ”—link: https://huggingface.co/blog/not-lain/trainer-api-and-mixin-classes
  • 2 replies
ยท
replied to radames's post about 1 month ago
view reply

I see you're using the image slider component too, nice work โค๏ธโค๏ธ

replied to abhishek's post about 1 month ago
posted an update about 1 month ago
posted an update about 1 month ago
view post
Post
1742
๐Ÿš€ just reached 3K+ readers on this blog post about RAG using only HF๐Ÿค— related tools in just a little over 1 week from publishing.

๐Ÿ“ƒthe most interesting thing about it is that you can use the FAISS index in the datasets library to retrieve your most similar documents.

๐Ÿ”—https://huggingface.co/blog/not-lain/rag-chatbot-using-llama3

Happy reading everyone โœจ
replied to VictorSanh's post about 1 month ago
replied to abhishek's post about 2 months ago
replied to tomaarsen's post about 2 months ago
replied to HeshamHaroon's post about 2 months ago
view reply

nope it's not a bug, the posts feature is now open for everyone

posted an update about 2 months ago
view post
Post
2256
๐Ÿ”ฅ **transformers** 4.40.0 is out ๐Ÿ”ฅ

โš™๏ธ you can now push your custom pipelines easily to ๐Ÿค—, allowing people to easily use your model in a more friendly, unified way.

๐Ÿค“ I already updated my blog to match the new feature https://huggingface.co/blog/not-lain/custom-architectures-with-huggingface.

๐Ÿ“ƒA list of some repos that have custom pipelines :
* briaai/RMBG-1.4
* p1atdev/siglip-tagger-test-3
* sgugger/test-dynamic-pipeline
replied to Wauplin's post 3 months ago
view reply

x3 download speed in HfFileSystem = ๐Ÿ”ฅ๐Ÿš€
I also really loved using the PyTorchModelHubMixin class ๐Ÿค—๐Ÿค—

replied to Xenova's post 4 months ago
replied to Xenova's post 4 months ago
replied to victor's post 4 months ago
view reply

or like make it a badge in their profiles if they exceed 100 contributions, could be a nice motive for people to make them engage more in the hub

replied to victor's post 4 months ago
view reply

maybe ๐Ÿง™โ€โ™€๏ธ๐Ÿง™โ€โ™‚๏ธ for open sorcerers out there

replied to s3nh's post 5 months ago
replied to Tonic's post 5 months ago
view reply

we're actually an anime/meme group and i made this community for AI + anime related stuff \(๏ฟฃ๏ธถ๏ฟฃ*\))

replied to Tonic's post 5 months ago
view reply

@Tonic we just reached 300000 members yerterday on FB ๐Ÿฅณ๐Ÿฅณ
image.png