Instructions to use danielruss/is_job_title_gist_small with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use danielruss/is_job_title_gist_small with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-classification", model="danielruss/is_job_title_gist_small")# Load model directly from transformers import AutoTokenizer, AutoModelForSequenceClassification tokenizer = AutoTokenizer.from_pretrained("danielruss/is_job_title_gist_small") model = AutoModelForSequenceClassification.from_pretrained("danielruss/is_job_title_gist_small", device_map="auto") - sentence-transformers
How to use danielruss/is_job_title_gist_small with sentence-transformers:
from sentence_transformers import SentenceTransformer model = SentenceTransformer("danielruss/is_job_title_gist_small") sentences = [ "The weather is lovely today.", "It's so sunny outside!", "He drove to the stadium." ] embeddings = model.encode(sentences) similarities = model.similarity(embeddings, embeddings) print(similarities.shape) # [3, 3] - Transformers.js
How to use danielruss/is_job_title_gist_small with Transformers.js:
// npm i @huggingface/transformers import { pipeline } from '@huggingface/transformers'; // Allocate pipeline const pipe = await pipeline('text-classification', 'danielruss/is_job_title_gist_small'); - Notebooks
- Google Colab
- Kaggle
Model Card for is_job_title_gist_small
Model Description
This is a binary text classification model fine-tuned on avsolatorio/GIST-small-Embedding-v0. It is designed to classify short text inputs and determine if they represent a Job Title (Label 1) or Everyday Text (Label 0).
- Developed by: danielruss
- Model type: Transformer-based Sequence Classification (GIST / BERT architecture)
- Language: English
- License: MIT
- Finetuned from model:
avsolatorio/GIST-small-Embedding-v0
Intended Uses & Limitations
This model is optimized to detect isolated job titles or occupational nouns (e.g., "Senior Software Engineer", "Neurosurgeon").
Limitation: It is not an NER (Named Entity Recognition) model. If a job title is embedded within a conversational sentence (e.g., "I worked as a plumber for 7 years"), the model will likely classify the entire sentence as Everyday Text (Label 0).
Training Details
The model was fine-tuned on a balanced, deduplicated dataset of 101,110 samples.
- Positive Class (1): Clean occupational titles from O*NET.
- Negative Class (0): Length-matched slices of everyday text and simple Wikipedia sentences.
- Hardware: Apple Silicon (MPS)
Evaluation Results
- Test Accuracy: ~99.39% from a test/train split... This is obnoxiously high because it is from the test/train split. I am looking into an independent validation set.
How to Get Started with the Model
You can use the model in Python with the pipeline API. The repository includes both PyTorch (FP32) weights, FP32 ONNX, and INT8 ONNX weights for fast inference!
1. Standard Huggingface (Python) Implementation
from transformers import pipeline
# Load the model directly using the pipeline
classifier = pipeline("text-classification", model="danielruss/is_job_title_gist_small")
print(classifier("Machine Learning Engineer"))
# Output: [{'label': 'Job title', 'score': 0.9991}]
Loading the ONNX INT8 Model (Recommended)
from optimum.onnxruntime import ORTModelForSequenceClassification
from transformers import AutoTokenizer, pipeline
repo_id = "danielruss/is_job_title_gist_small"
# Load the optimized INT8 weights
model = ORTModelForSequenceClassification.from_pretrained(
repo_id,
subfolder="onnx",
file_name="model_quantized.onnx"
)
tokenizer = AutoTokenizer.from_pretrained(repo_id)
classifier = pipeline("text-classification", model=model, tokenizer=tokenizer)
# Predict
print(classifier("Machine Learning Engineer"))
# Output: [{'label': 'Job title', 'score': 0.9990}]
transformers.js
# I use the cdn, you can install via npm also...
import { pipeline } from 'https://cdn.jsdelivr.net/npm/@huggingface/transformers@4.2.0/+esm'
let is_job_fp = await pipeline('text-classification', "danielruss/is_job_title_gist_small", { dtype: 'fp32'})
let is_job_quantized = await pipeline('text-classification', "danielruss/is_job_title_gist_small", { quantized:'true'})
let res_fp = await is_job_fp("Dog Catcher")
console.log(res_fp)
let res_q = await is_job_quantized("Dog Catcher")
console.log(res_q)
- Downloads last month
- 230