doing something
713 subscribers
911 photos
36 videos
36 files
1.94K links
@smlkw doing something, just my notes to keep updates
Download Telegram
doing something
MamayLM-Gemma-2-9B-IT-v0.1: - transformers: https://colab.research.google.com/drive/1XAECWGFyMsgYeidF7XhHW7U-_LsdQSkB?usp=sharing - vllm: https://colab.research.google.com/drive/1QC-qfesfRrOXJlJmkO0bGj9EwHfg8uSQ?usp=sharing - llama-cpp: https://colab.r…
Made a colab to show how we can use MamayLM with GLiNER model to solve the PII detection task for Ukrainian.

In test cases, only one sample GLiNER could not successfully recognize, but after English translation - it does.

So, the algorithm is simple:

- Translate Ukrainian sentence to English
- Load GLiNER model that is zero-shot NER model
- Pass translated sentences and detect PII entities

Instead of MamayLM, we can use MADLAD models or other NMT models.

Colab: https://colab.research.google.com/drive/1P3jBiixz0Mv31NF6cc6K3wG5HtOW_eL9?usp=sharing

#ai #pii #nlp #security
🔥3
Forwarded from Ihor Stepanov
You can reduce the translation step right now thanks to this: https://huggingface.co/knowledgator/gliner-x-large-v0.5
doing something
Photo
Slightly optimized the colab code, now it uses bfloat16 precision

It's more production-ready type of code
🔥1
knowledgator/gliner-bi-base-v1.0 + Helsinki-NLP/opus-mt-tc-big-zle-en in float16 precision

All test cases passing, but some entity types incorrectly detected
If you run MamayLM using llama-cpp:


podman run -v ./models:/models --device="nvidia.com/gpu=0" -p 8000:8000 ghcr.io/ggml-org/llama.cpp:server-cuda -m /models/MamayLM-Gemma-2-9B-IT-v0.1.Q4_K_S.gguf --port 8000 --host 0.0.0.0 -n 1024 --n-gpu-layers -1


Then it uses around 1480MiB on GPU

#nlp #llm
vLLM supports GGUF too - https://docs.vllm.ai/en/v0.9.0.1/features/quantization/gguf.html - but many model architectures are not supported at inference yet

#llm #ai #vllm