LAin
AI & ML interests
Articles
Organizations
not-lain's activity
@m-ric
really nice video, also I really loved the blogpost.
Thanks a lot ๐ค
Thanks @Taylor658 ๐ค
๐Place: huggingface discord server
๐Link : https://discord.gg/hugging-face-879548962464493619?event=1245406127668203541
@lunarflu don't forget HF unwrapped too, similar to what GitHub, Reddit and other websites do, would be fun to have
@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.
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")
if you have any extra resources about using, creating, or finetuning them feel free to share them below ๐ค
reel
thank you sooooo much โค๏ธโค๏ธ
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
I see you're using the image slider component too, nice work โค๏ธโค๏ธ
Nice work @abhishek โจ
๐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 โจ
Did anyone say HF?
literally on ๐ฅ
Nice work ๐ฅณ๐ฅณ
nope it's not a bug, the posts feature is now open for everyone
โ๏ธ 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
x3 download speed in HfFileSystem = ๐ฅ๐
I also really loved using the PyTorchModelHubMixin class ๐ค๐ค
try adding labels
parameter to the forward function in my version of of the RMBG-1.4 model in here https://huggingface.co/not-lain/CustomCodeForRMBG/blob/main/briarmbg.py#L392, this should allow the model to be finetuned easily using the trainer API.
find out more about the labels parameter in this documentation :
https://huggingface.co/docs/transformers/custom_models#writing-a-custom-model
it should look somethind like this :
any open contributions are welcome.
Made a little contribution and it is now easier than ever to use the model via the transformers library
all you have to do is use the following code to access the model :
checkout more details in this pull request : https://huggingface.co/briaai/RMBG-1.4/discussions/9
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
maybe ๐งโโ๏ธ๐งโโ๏ธ for open sorcerers out there
leaving this for future readers, huggingface has a really nice documentation about RAG which i highly recommend reading if you're interested about using them. It incorporates clear examples and neatly formatted code :
https://huggingface.co/docs/transformers/model_doc/rag
we're actually an anime/meme group and i made this community for AI + anime related stuff \(๏ฟฃ๏ธถ๏ฟฃ*\))
@Tonic
we just reached 300000 members yerterday on FB ๐ฅณ๐ฅณ