Text Generation
Transformers
Safetensors
English
llama
zero-shot NER
NER
conversational
text-generation-inference
Instructions to use expertai/SLIMER with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use expertai/SLIMER with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="expertai/SLIMER") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("expertai/SLIMER") model = AutoModelForCausalLM.from_pretrained("expertai/SLIMER", device_map="auto") messages = [ {"role": "user", "content": "Who are you?"}, ] inputs = tokenizer.apply_chat_template( messages, add_generation_prompt=True, tokenize=True, return_dict=True, return_tensors="pt", ).to(model.device) outputs = model.generate(**inputs, max_new_tokens=256) print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use expertai/SLIMER with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "expertai/SLIMER" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "expertai/SLIMER", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/expertai/SLIMER
- SGLang
How to use expertai/SLIMER with SGLang:
Install from pip and serve model
# Install SGLang from pip: pip install sglang # Start the SGLang server: python3 -m sglang.launch_server \ --model-path "expertai/SLIMER" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "expertai/SLIMER", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker images
docker run --gpus all \ --shm-size 32g \ -p 30000:30000 \ -v ~/.cache/huggingface:/root/.cache/huggingface \ --env "HF_TOKEN=<secret>" \ --ipc=host \ lmsysorg/sglang:latest \ python3 -m sglang.launch_server \ --model-path "expertai/SLIMER" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "expertai/SLIMER", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use expertai/SLIMER with Docker Model Runner:
docker model run hf.co/expertai/SLIMER
Update README.md
Browse files17 unmodified lines1819202122232425262728293031323334353637383940414243444546474849505152535455565758596018 unmodified lines798081828384858687888917 unmodified lines<head><title>Instruction Tuning Prompt</title><style>.container {border: none;padding: 5px;width: 300px;margin: 0 auto;font-family: Arial, sans-serif;font-size: 8px;border-radius: 10px; /* Rounded borders for container */overflow: hidden; /* Ensure child elements respect container's rounded borders */}.header, .footer {background-color: black;color: white;padding: 5px;text-align: center;font-weight: bold;font-size: 14px;border-top-left-radius: 10px; /* Rounded top-left corner */border-top-right-radius: 10px; /* Rounded top-right corner */}.footer {border-bottom-left-radius: 10px; /* Rounded bottom-left corner */border-bottom-right-radius: 10px; /* Rounded bottom-right corner */margin-top: 10px; /* Provide some space between content and footer */}.content {padding: 5px;}.definition, .guidelines {padding: 5px;border-radius: 10px; /* Rounded borders for definition and guidelines */}.definition {background-color: #ccffcc;}.guidelines {background-color: #ffffcc;}</style></head>18 unmodified lines<p>Return a JSON list of instances of this Named Entity type. Return an empty list if no instances are present.</p><p><b>[/INST]</b></p></div></div></body></html>Currently existing approaches fine-tune on an extensive number of entity classes (around 13K) and assess zero-shot NER capabilities on Out-Of-Distribution input domains.SLIMER performs comparably to these state-of-the-art models on OOD input domains, while being trained only a reduced number of samples and a set of NE tags that overlap in lesser degree with test sets.17 unmodified lines18192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737418 unmodified lines9394959697989910010110210310410517 unmodified lines<head><title>Instruction Tuning Prompt</title><style>body {font-family: Arial, sans-serif;font-size: 14px;text-align: center;margin: 0; /* Remove default margin */min-height: 100vh; /* Ensure full viewport height coverage */display: flex;flex-direction: column;}.container {border: none;padding: 5px;width: 300px;margin: auto;border-radius: 10px;overflow: hidden;flex: 1; /* Take up remaining vertical space */display: flex;flex-direction: column;}.header {background-color: black;color: white;padding: 10px;font-weight: bold;border-top-left-radius: 10px;border-top-right-radius: 10px;}.content {flex: 1;padding: 10px;}.definition {background-color: #ccffcc;border-radius: 10px;padding: 10px;margin-bottom: 10px;}.guidelines {background-color: #ffffcc;border-radius: 10px;padding: 10px;margin-bottom: 10px;}.footer {background-color: black;color: white;padding: 10px;font-weight: bold;border-bottom-left-radius: 10px;border-bottom-right-radius: 10px;}</style></head>18 unmodified lines<p>Return a JSON list of instances of this Named Entity type. Return an empty list if no instances are present.</p><p><b>[/INST]</b></p></div><div class="footer">Footer content</div></div></body></html>Currently existing approaches fine-tune on an extensive number of entity classes (around 13K) and assess zero-shot NER capabilities on Out-Of-Distribution input domains.SLIMER performs comparably to these state-of-the-art models on OOD input domains, while being trained only a reduced number of samples and a set of NE tags that overlap in lesser degree with test sets.
README.md+37-21