Text Generation
Transformers
Safetensors
PyTorch
English
llama
entity-extraction
calendar-events
fine-tuned
text-generation-inference
Instructions to use Shresth12345/entity-extraction-smollm with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Shresth12345/entity-extraction-smollm with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="Shresth12345/entity-extraction-smollm")# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("Shresth12345/entity-extraction-smollm") model = AutoModelForCausalLM.from_pretrained("Shresth12345/entity-extraction-smollm", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use Shresth12345/entity-extraction-smollm with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "Shresth12345/entity-extraction-smollm" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Shresth12345/entity-extraction-smollm", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/Shresth12345/entity-extraction-smollm
- SGLang
How to use Shresth12345/entity-extraction-smollm 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 "Shresth12345/entity-extraction-smollm" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Shresth12345/entity-extraction-smollm", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'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 "Shresth12345/entity-extraction-smollm" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Shresth12345/entity-extraction-smollm", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use Shresth12345/entity-extraction-smollm with Docker Model Runner:
docker model run hf.co/Shresth12345/entity-extraction-smollm
File size: 579 Bytes
ca19b60 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 | {
"example_usage": {
"input": "Extract entities from: Meeting with John tomorrow at 2pm for 1 hour",
"expected_output": {
"action": "Meeting",
"date": "tomorrow",
"time": "2:00 PM",
"attendees": [
"John"
],
"location": null,
"duration": "1 hour",
"recurrence": null,
"notes": null
}
},
"supported_fields": [
"action",
"date",
"time",
"attendees",
"location",
"duration",
"recurrence",
"notes"
],
"input_format": "Extract entities from: [your event description]"
} |