Edit model card

MOMENT-1-large-embedding-v0.1

This is an embedding model derived from AutonLab/MOMENT-1-large

How to use

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)
Downloads last month
91
Safetensors
Model size
346M params
Tensor type
F32
·
Inference Examples
Inference API (serverless) does not yet support model repos that contain custom code.