--- library_name: transformers tags: - time series - embedding license: mit --- # MOMENT-1-large-embedding-v0.1 This is an embedding model derived from [AutonLab/MOMENT-1-large](https://huggingface.co/AutonLab/MOMENT-1-large) ## How to use ```Python 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) ``` ```Python import torch device = "cuda" if torch.cuda.is_available() else "cpu" print(device) model.to(device) ``` ```Python 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], return_tensors="pt") # You can also pass multiple data in a list. inputs = inputs.to(device) outputs = model(**inputs) print(outputs.embeddings) ```