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 files
README.md
CHANGED
|
@@ -18,49 +18,38 @@ Instructed on a reduced number of samples, it is designed to tackle never-seen-b
|
|
| 18 |
<head>
|
| 19 |
<title>Instruction Tuning Prompt</title>
|
| 20 |
<style>
|
| 21 |
-
body {
|
| 22 |
-
font-family: Arial, sans-serif;
|
| 23 |
-
font-size: 14px;
|
| 24 |
-
text-align: center;
|
| 25 |
-
margin: 0; /* Remove default margin */
|
| 26 |
-
min-height: 100vh; /* Ensure full viewport height coverage */
|
| 27 |
-
display: flex;
|
| 28 |
-
flex-direction: column;
|
| 29 |
-
}
|
| 30 |
.container {
|
| 31 |
border: none;
|
| 32 |
padding: 5px;
|
| 33 |
width: 300px;
|
| 34 |
-
margin: auto;
|
| 35 |
-
|
| 36 |
-
|
| 37 |
-
|
| 38 |
-
|
| 39 |
-
flex-direction: column;
|
| 40 |
}
|
| 41 |
.header {
|
| 42 |
background-color: black;
|
| 43 |
color: white;
|
| 44 |
-
padding:
|
|
|
|
| 45 |
font-weight: bold;
|
| 46 |
-
|
| 47 |
-
border-top-
|
|
|
|
| 48 |
}
|
| 49 |
.content {
|
| 50 |
-
|
| 51 |
-
|
|
|
|
|
|
|
|
|
|
| 52 |
}
|
| 53 |
.definition {
|
| 54 |
background-color: #ccffcc;
|
| 55 |
-
border-radius: 10px;
|
| 56 |
-
padding: 10px;
|
| 57 |
-
margin-bottom: 10px;
|
| 58 |
}
|
| 59 |
.guidelines {
|
| 60 |
background-color: #ffffcc;
|
| 61 |
-
border-radius: 10px;
|
| 62 |
-
padding: 10px;
|
| 63 |
-
margin-bottom: 10px;
|
| 64 |
}
|
| 65 |
.footer {
|
| 66 |
background-color: black;
|
|
@@ -93,7 +82,7 @@ Instructed on a reduced number of samples, it is designed to tackle never-seen-b
|
|
| 93 |
<p>Return a JSON list of instances of this Named Entity type. Return an empty list if no instances are present.</p>
|
| 94 |
<p><b>[/INST]</b></p>
|
| 95 |
</div>
|
| 96 |
-
<div class="footer">
|
| 97 |
</div>
|
| 98 |
</body>
|
| 99 |
</html>
|
|
|
|
| 18 |
<head>
|
| 19 |
<title>Instruction Tuning Prompt</title>
|
| 20 |
<style>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 21 |
.container {
|
| 22 |
border: none;
|
| 23 |
padding: 5px;
|
| 24 |
width: 300px;
|
| 25 |
+
margin: 0 auto;
|
| 26 |
+
font-family: Arial, sans-serif;
|
| 27 |
+
font-size: 8px;
|
| 28 |
+
border-radius: 10px; /* Rounded borders for container */
|
| 29 |
+
overflow: hidden; /* Ensure child elements respect container's rounded borders */
|
|
|
|
| 30 |
}
|
| 31 |
.header {
|
| 32 |
background-color: black;
|
| 33 |
color: white;
|
| 34 |
+
padding: 5px;
|
| 35 |
+
text-align: center;
|
| 36 |
font-weight: bold;
|
| 37 |
+
font-size: 14px;
|
| 38 |
+
border-top-left-radius: 10px; /* Rounded top-left corner */
|
| 39 |
+
border-top-right-radius: 10px; /* Rounded top-right corner */
|
| 40 |
}
|
| 41 |
.content {
|
| 42 |
+
padding: 5px;
|
| 43 |
+
}
|
| 44 |
+
.definition, .guidelines {
|
| 45 |
+
padding: 5px;
|
| 46 |
+
border-radius: 10px; /* Rounded borders for definition and guidelines */
|
| 47 |
}
|
| 48 |
.definition {
|
| 49 |
background-color: #ccffcc;
|
|
|
|
|
|
|
|
|
|
| 50 |
}
|
| 51 |
.guidelines {
|
| 52 |
background-color: #ffffcc;
|
|
|
|
|
|
|
|
|
|
| 53 |
}
|
| 54 |
.footer {
|
| 55 |
background-color: black;
|
|
|
|
| 82 |
<p>Return a JSON list of instances of this Named Entity type. Return an empty list if no instances are present.</p>
|
| 83 |
<p><b>[/INST]</b></p>
|
| 84 |
</div>
|
| 85 |
+
<div class="footer"></div>
|
| 86 |
</div>
|
| 87 |
</body>
|
| 88 |
</html>
|