AI & ML interests

custom modeling and hugging face integrations

Recent Activity

not-lainΒ  updated a model 20 days ago
phxia/gpt2_adapter
not-lainΒ  updated a model about 1 month ago
phxia/test-peft-mixin
not-lainΒ  updated a dataset about 1 month ago
phxia/sft-standard
View all activity

phxia's activity

not-lainΒ 
posted an update about 19 hours ago
not-lainΒ 
posted an update 13 days ago
view post
Post
1180
we now have more than 2000 public AI models using ModelHubMixinπŸ€—
not-lainΒ 
posted an update 18 days ago
view post
Post
3929
Published a new blogpost πŸ“–
In this blogpost I have gone through the transformers' architecture emphasizing how shapes propagate throughout each layer.
πŸ”— https://huggingface.co/blog/not-lain/tensor-dims
some interesting takeaways :
not-lainΒ 
updated a model about 1 month ago
not-lainΒ 
posted an update 3 months ago
view post
Post
2293
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="")
not-lainΒ 
updated a Space 3 months ago
not-lainΒ 
posted an update 6 months ago
not-lainΒ 
posted an update 7 months ago
view post
Post
7727
I am now a huggingface fellow πŸ₯³
Β·
not-lainΒ 
posted an update 7 months ago
view post
Post
2682
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 7 months ago
view post
Post
1455
Hello beautiful people.
I wanted to thank everyone that read my blogpost and I am glad to share that we have achieved 11000 readers πŸ₯³
I couldn't have done this without you, so once again thanks a lot everyone for the support πŸ’–
If you haven't already you can read my blog post at: https://huggingface.co/blog/not-lain/rag-chatbot-using-llama3
not-lainΒ 
posted an update 8 months ago
view post
Post
2101
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 8 months ago
view post
Post
1938
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
Β·