Literally Me FRFR Research Society

community

AI & ML interests

Being Ryan Gosling, being Patrick Bateman, watching Blade Runner 2049 (2017) on repeat, rewatching American Psycho (2000), watching Barbie (2023). Get Kenergetic!

Recent Activity

LMFResearchSociety's activity

Korakoe 
posted an update 10 months ago
not-lain 
posted an update 10 months ago
view post
Post
2111
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
not-lain 
posted an update 10 months ago
not-lain 
posted an update 11 months ago
view post
Post
1549
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")

not-lain 
posted an update 11 months ago
view post
Post
1140
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 🤗
not-lain 
posted an update 11 months ago
not-lain 
posted an update 11 months ago
not-lain 
posted an update 11 months ago
view post
Post
1790
🚀 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 ✨
not-lain 
posted an update 11 months ago
view post
Post
2301
🔥 **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