The Waifu Research Department

community

AI & ML interests

Waifu and Husbando Research

Recent Activity

waifu-research-department's activity

not-lain 
posted an update about 1 month ago
view post
Post
1832
ever wondered how you can make an API call to a visual-question-answering model without sending an image url 👀

you can do that by converting your local image to base64 and sending it to the API.

recently I made some changes to my library "loadimg" that allows you to make converting images to base64 a breeze.
🔗 https://github.com/not-lain/loadimg

API request example 🛠️:
from loadimg import load_img
from huggingface_hub import InferenceClient

# or load a local image
my_b64_img = load_img(imgPath_url_pillow_or_numpy ,output_type="base64" ) 

client = InferenceClient(api_key="hf_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx")

messages = [
	{
		"role": "user",
		"content": [
			{
				"type": "text",
				"text": "Describe this image in one sentence."
			},
			{
				"type": "image_url",
				"image_url": {
					"url": my_b64_img # base64 allows using images without uploading them to the web
				}
			}
		]
	}
]

stream = client.chat.completions.create(
    model="meta-llama/Llama-3.2-11B-Vision-Instruct", 
	messages=messages, 
	max_tokens=500,
	stream=True
)

for chunk in stream:
    print(chunk.choices[0].delta.content, end="")
ajibawa-2023 
posted an update about 2 months ago
view post
Post
2988
New Dataset: Software-Architecture
Link: ajibawa-2023/Software-Architecture

I am releasing a Large Dataset covering topics related to Software-Architecture. This dataset consists of around 450,000 lines of data in jsonl.

I have included following topics:

Architectural Frameworks

Architectural Patterns for Reliability

Architectural Patterns for Scalability

Architectural Patterns

Architectural Quality Attributes

Architectural Testing

Architectural Views

Architectural Decision-Making

Advanced Research

Cloud-Based Architectures

Component-Based Architecture

Data Architecture

Emerging Trends

Event-Driven Architecture

Evolvability and Maintainability

Microservices and Monolithic

Microservices Architecture

Security Architecture

Service-Oriented Architecture

Software Design Principles

and Many More!

This dataset is useful in LLM development. Also those who are working on developing Software development related LLMs then this dataset can be useful.

This dataset is very useful to Researchers as well.
·
not-lain 
posted an update 5 months ago
not-lain 
posted an update 5 months ago
view post
Post
7697
I am now a huggingface fellow 🥳
·
not-lain 
posted an update 6 months ago
view post
Post
2661
I have finished writing a blogpost about building an image-based retrieval system, This is one of the first-ever approaches to building such a pipeline using only open-source models/libraries 🤗

You can checkout the blogpost in https://huggingface.co./blog/not-lain/image-retriever and the associated space at not-lain/image-retriever .

✨ If you want to request another blog post consider letting me know down below or you can reach out to me through any of my social media

📖 Happy reading !
not-lain 
posted an update 6 months ago
not-lain 
posted an update 7 months ago
view post
Post
2076
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 7 months ago
not-lain 
posted an update 7 months ago
view post
Post
1533
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 8 months ago
view post
Post
1128
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 8 months ago
ajibawa-2023 
posted an update 8 months ago
view post
Post
1918
Thank you very much hf team for accepting me! I was waiting for very long time. Thank you
not-lain 
posted an update 8 months ago
not-lain 
posted an update 8 months ago
view post
Post
1781
🚀 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 8 months ago
view post
Post
2290
🔥 **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
samusenps 
posted an update 9 months ago
view post
Post
4027
Hello world!

I'd like to share with you all today some specific Research about the Brain & some surface level thoughts

Music (Frequencies)
Brain2Music: Reconstructing Music from Human Brain Activity (2307.11078)

Speech
Decoding speech from non-invasive brain recordings (2208.12266)

Image
Seeing through the Brain: Image Reconstruction of Visual Perception from Human Brain Signals (2308.02510)
DreamDiffusion: Generating High-Quality Images from Brain EEG Signals (2306.16934)
NeuroPictor: Refining fMRI-to-Image Reconstruction via Multi-individual Pretraining and Multi-level Modulation (2403.18211)

Video
NeuroCine: Decoding Vivid Video Sequences from Human Brain Activties (2402.01590)
Cinematic Mindscapes: High-quality Video Reconstruction from Brain Activity (2305.11675)

3D
MinD-3D: Reconstruct High-quality 3D objects in Human Brain (2312.07485)

Potential Opportunities For BCI

4D
DreamGaussian4D: Generative 4D Gaussian Splatting (2312.17142)

Realistic High Quality Video
Sora: A Review on Background, Technology, Limitations, and Opportunities of Large Vision Models (2402.17177)

samusenps/bci-661206b642da659656474db2

Reading minds is cool & useful but could be utilized for many things other than thought interrogation 👀

Current Co pilots are Boring! & have much untapped potential & also people don't seem to want autonomous agents replacing them although it is inevitable for some cases

I believe if humans want to become an interplanetary species that can utilize our accumulative research we need to extend our brain with technology in order to be smarter. Imagine a Co-pilot for your head, Adding extra ‘RAM’ to the brain, or even Processing external data within the brain.

Ok people are afraid of implanting computer chips within their brains, what if someone hacks it ? , the invasive possibilities are crazy!

How can we ensure Safety & Interpretability in brain computer interfaces
1. External Non Invasive Brain Computer interfaces [ think similar to https://neurosity.co/crown (overpriced IMO & Hardware is closed source proprietary, who knows what they’re doing 👁️) ]
2. Full Reproducible Open-Source Stack Brain computer interface down to the hardware, operating system, and application level.
3. Maybe you can't, there may always be a risk of danger, though not as consequential with 1 & 2
  • 2 replies
·