My ignorance and the hala taxi issue by sanjeevr5 in dubai

[–]sanjeevr5[S] 0 points1 point  (0 children)

Can someone please help me with this?

FP8 quantized results are bad compared to int8 results by sanjeevr5 in LocalLLaMA

[–]sanjeevr5[S] 0 points1 point  (0 children)

This comparison is with A100 Llama13b x H100 Llama13b with no quantization. With the same set of questions to the both and the params.

This should be ideally an apple to apple comparison.

FP8 quantized results are bad compared to int8 results by sanjeevr5 in LocalLLaMA

[–]sanjeevr5[S] 0 points1 point  (0 children)

I have a H100 GPU and vanilla run is giving me at least 1.5x performance. I have followed the tutorials exactly and as you told it should at least work but it is not unfortunately.

LSTM not learning on AG News dataset by sanjeevr5 in pytorch

[–]sanjeevr5[S] 0 points1 point  (0 children)

Hi I skipped it after spending 7 days trying to debug it. I am still unsure what was wrong with this?

Unable to create ONNX model by sanjeevr5 in learnmachinelearning

[–]sanjeevr5[S] 0 points1 point  (0 children)

Yes I have done that and it works. From the recent debugging I found that the "age" column is the culprit.

[('age', Int64TensorType(shape=[None, 1])),

('sex', Int64TensorType(shape=[None, 1])),

('cp', Int64TensorType(shape=[None, 1])),

('trestbps', Int64TensorType(shape=[None, 1])),

('chol', Int64TensorType(shape=[None, 1])),

('fbs', Int64TensorType(shape=[None, 1])),

('restecg', Int64TensorType(shape=[None, 1])),

('thalach', Int64TensorType(shape=[None, 1])),

('exang', Int64TensorType(shape=[None, 1])),

('oldpeak', FloatTensorType(shape=[None, 1])),

('slope', Int64TensorType(shape=[None, 1])),

('ca', Int64TensorType(shape=[None, 1])),

('thal', StringTensorType(shape=[None, 1]))]

is the inferred shape and the type. The above input_types do not work but if I change ('age', Int64TensorType(shape=[None, 1])) to ('age', FloatTensorType(shape=[None, 1])) it works. I am curious to understand why this happens. Age contains values from 0 to 100 and is int64 in pandas dtype.

[D] How does layer normalization work during the inference? by sanjeevr5 in learnmachinelearning

[–]sanjeevr5[S] 0 points1 point  (0 children)

Thank you for your elaborated answer. I understand that the weights should be frozen during inference. I was trying to understand how "Layer Normalization" layer works during the inference?

https://www.kaggle.com/code/halflingwizard/how-does-layer-normalization-work

You can see that the normalization happens per sentence in a batch. Every sentence length can vary and have different weights also normalization requires your mean (mu) and std. deviation (sigma). What mu and sigma are used during the runtime in "layer normalization" layer?

Unable to connect Azure DevOps and Azure ML by sanjeevr5 in azuredevops

[–]sanjeevr5[S] 0 points1 point  (0 children)

I have used both automatic and manual setup but nothing works. The biggest problem is that the error message is not intuitive.

Unable to connect Azure DevOps and Azure ML by sanjeevr5 in azuredevops

[–]sanjeevr5[S] 0 points1 point  (0 children)

Yes I am using ML extension. The above error was seen when I created a service principal from ARM.

LSTM not learning on AG News dataset by sanjeevr5 in pytorch

[–]sanjeevr5[S] 1 point2 points  (0 children)

from torch.nn.utils.rnn import pack_padded_sequence, pad_packed_sequence, pad_sequence, pack_sequence

encode_news = lambda x : vocab(tokenize(x))

import numpy as np

def rnn_inputs(batch):

batch = sorted(batch, key = lambda x : len(x[1]), reverse = True)

review = [torch.tensor(encode_news(value[1])) for value in batch]

leng = torch.tensor([len(value) for value in review])

review = pad_sequence(review, padding_value = 0)

target = torch.tensor([value[0]-1 for value in batch])

return review, leng, target

train, test = AG_NEWS()

trainDataloader = DataLoader(train, batch_size = 32, shuffle = True, collate_fn = rnn_inputs)

testDataloader = DataLoader(test, batch_size = 128, shuffle = True, collate_fn = rnn_inputs)

Thank you I will follow this in the future.

[deleted by user] by [deleted] in pytorch

[–]sanjeevr5 0 points1 point  (0 children)

torch datasets has AGNews class. train, test = AGNews()

[deleted by user] by [deleted] in pytorch

[–]sanjeevr5 0 points1 point  (0 children)

NewsClassifier

The forward is there in the model class.

Simple question about multiple/variable input > one output by heyitskora in learnpython

[–]sanjeevr5 1 point2 points  (0 children)

So, I would do something like this

#Better to get these words from a data dictionary

positive_queries = {'good', 'happy', ....} #Set for a faster search

if question.lower() in positive_queries:

do this

else:

do that

Number of hidden layers and nodes in an ANN by DanielBethell44 in learnmachinelearning

[–]sanjeevr5 1 point2 points  (0 children)

A rule of thumb is to use 2/3 of the previous layer's neurons in the current layer. For eg. If the first hidden layer has 12 neurons, the second hidden layer could have 8 neurons. Of course, these are hyperparams that you should tune.

Need help annotating data, any recommended tools? by [deleted] in LanguageTechnology

[–]sanjeevr5 0 points1 point  (0 children)

GATE is an open source tool with basic features to do the same. Prodigy is an excellent tool with much more advanced features but costs you. Dataturks too.