doing something
713 subscribers
923 photos
36 videos
36 files
1.96K links
@smlkw doing something, just my notes to keep updates
Download Telegram
doing something
Phi 3.5 vision + HQQ (4-bits), weights are in bfloat16 vRAM usage decreased: 8.9 GB -> 3.8 GB https://colab.research.google.com/drive/176YsmMtdy-o0g19HVUPx7gKZ4OQ2tdxl?usp=sharing #ai #cv #quantization
It is possible to quantize this model as the following:

from transformers import AutoModelForCausalLM, HqqConfig

quant_config = HqqConfig(nbits=4, group_size=64)

model = AutoModelForCausalLM.from_pretrained(
model_id,
device_map="cuda",
torch_dtype=torch.bfloat16,
trust_remote_code=True,
attn_implementation=attn_implementation,
quantization_config=quant_config
)
https://huggingface.co/apple/DepthPro

In this demo I've used Apple's model to extract an object (a man) with transparent background

Also, attached the code you can use to do the same

#ai #cv
doing something
Used this project in https://github.com/egorsmkv/taskiq-pgsql-rabbitmq where Taskiq works as a good replacement of Celery #python #backend
Some improvements can be applied to this integration

For example, here, we can store not only a pickle object but full information about a task like the unpickled object (as shown on the picture)