Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

LinearSolve::luc: Result for LinearSolve of badly conditioned matrix {{7.61902,0.0118411,0.00677937,0.10901,0.0815707,0.0166805,0.184858,0.0340636,0.0288654,0.0182311,<<246>>},<<9>>,<<246>>} may contain significant numerical errors. #7

Open
dbl001 opened this issue Feb 29, 2024 · 1 comment

Comments

@dbl001
Copy link

dbl001 commented Feb 29, 2024

Thanks for creating these Mathematica packages.
When I run NMF on a GPT-2 embedding matrix, I get warnings from LinearSolve.
I tried the following RegularizationParameters: 0.01, 0.1, 1, 2.
I also tried different PrecisionGoals: 8, 16, 32, 64.
Any suggestions?

gpt2Model = NetModel["GPT2 Transformer Trained on WebText Data"]
embeddings = 
 NetExtract[gpt2Model, {"embedding", "embeddingtokens", "Weights"}]
{wMat, hMat} = 
  ResourceFunction["NonNegativeMatrixFactorization"][
   Normal[embeddings], 256, "RegularizationParameter" -> 2, 
   MaxSteps -> 300, PrecisionGoal -> 64];

Screenshot 2024-02-29 at 10 17 12 AM
@snailwowo
Copy link

snailwowo commented Feb 29, 2024 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants