Downloads · 30 days
13
13% of all-time downloads
Patronum-ZJ/GitPulse
GitPulse is a time series forecasting model from Patronum-ZJ. Use it for the time series forecasting task on the model card, and read the license before you ship it in a product. It is set up for pytorch. The card lists the license as apache-2.0.
GitPulse is a multimodal Transformer-based model that combines project text descriptions with historical activity data to predict GitHub project health metrics.
Downloads · 30 days
13
13% of all-time downloads
All-time downloads
101
Public
Repo size
271 MB
Likes
1
Public
Click a slice to open those files.
.pt271 MB · 100%
From the Hugging Face model README
GitPulse is a multimodal Transformer-based model that combines project text descriptions with historical activity data to predict GitHub project health metrics.
GitPulse leverages both textual metadata (project descriptions, topics) and historical time series (commits, issues, stars, etc.) to forecast future project activity. The key innovation is the adaptive fusion mechanism that dynamically balances text and time-series features.
| Parameter | Value |
|---|---|
| d_model | 128 |
| n_heads | 4 |
| n_layers | 2 |
| hist_len | 128 |
| pred_len | 32 |
| n_vars | 16 |
Evaluated on 636 test samples from 4,232 GitHub projects:
| Model | MSE ↓ | MAE ↓ | R² ↑ | DA ↑ | [email protected] ↑ |
|---|---|---|---|---|---|
| GitPulse | 0.0755 | 0.1094 | 0.7559 | 86.68% | 81.60% |
| CondGRU+Text | 0.0915 | 0.1204 | 0.7043 | 84.05% | 80.14% |
| Transformer | 0.1142 | 0.1342 | 0.6312 | 84.02% | 78.87% |
| LSTM | 0.2142 | 0.1914 | 0.3800 | 56.00% | 75.00% |
| Architecture | TS-Only R² | +Text R² | Improvement |
|---|---|---|---|
| Transformer → GitPulse | 0.6312 | 0.7559 | +19.8% |
| CondGRU → CondGRU+Text | 0.3328 | 0.7043 | +111.6% |
pip install torch transformers
import torch
from transformers import DistilBertTokenizer
# Load model
from model import GitPulseModel
model = GitPulseModel.from_pretrained('./')
# Prepare inputs
tokenizer = DistilBertTokenizer.from_pretrained('distilbert-base-uncased')
text = "A Python library for machine learning"
encoded = tokenizer(text, padding='max_length', truncation=True,
max_length=128, return_tensors='pt')
# Time series: [batch, hist_len, n_vars]
time_series = torch.randn(1, 128, 16)
# Predict
model.eval()
with torch.no_grad():
predictions = model(
time_series,
input_ids=encoded['input_ids'],
attention_mask=encoded['attention_mask']
)
# predictions shape: [1, 32, 16]
# Simple prediction interface
predictions = model.predict(
time_series=history_data, # [batch, 128, 16]
text="Project description...",
tokenizer=tokenizer
)
@article{gitpulse2024,
title={GitPulse: Multimodal Time Series Prediction for GitHub Project Health},
author={Anonymous},
journal={arXiv preprint},
year={2024}
}
Apache 2.0