Downloads · 30 days
24
3% of all-time downloads
HachiML/MOMENT-1-large-embedding-v0.1
MOMENT-1-large-embedding-v0.1 is a feature extraction model from HachiML. Use it when you need embeddings to search or compare text. It is set up for transformers. The card lists the license as mit.
This is an embedding model derived from AutonLab/MOMENT-1-large
Downloads · 30 days
24
3% of all-time downloads
All-time downloads
924
Public
Parameters
346M
1.4 GB on disk
Likes
1
Public
Click a slice to open those files.
.safetensors1.4 GB · 100%
From the Hugging Face model README
This is an embedding model derived from AutonLab/MOMENT-1-large
from transformers import AutoConfig, AutoModel, AutoFeatureExtractor
model_name = "HachiML/MOMENT-1-large-embedding-v0.1"
model = AutoModel.from_pretrained(model_name, trust_remote_code=True)
feature_extractor = AutoFeatureExtractor.from_pretrained(model_name, trust_remote_code=True)
import torch
device = "cuda" if torch.cuda.is_available() else "cpu"
print(device)
model.to(device)
hist_ndaq = pd.DataFrame("nasdaq_price_history.csv")
input_data = hist_ndaq[["Open", "High", "Low", "Close", "Volume"]].iloc[:512]
inputs = feature_extractor(input_data, return_tensors="pt")
# inputs = feature_extractor([input_data, input_data_2], return_tensors="pt") # You can also pass multiple data in a list.
inputs = inputs.to(device)
outputs = model(**inputs)
print(outputs.embeddings)