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

Size Paragraph #28

Open
devalexandre opened this issue Aug 9, 2023 · 1 comment
Open

Size Paragraph #28

devalexandre opened this issue Aug 9, 2023 · 1 comment

Comments

@devalexandre
Copy link

When I use a big paragraph, display a error

panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x40 pc=0x63cd47]

goroutine 1124 [running]:
github.com/nlpodyssey/spago/ag.Node.Value({0x0?, 0x0?})
	<autogenerated>:1 +0x27
github.com/nlpodyssey/spago/ag/fn.(*Add[...]).Forward(0xc8be40)
	/home/alexandre/pkg/mod/github.com/nlpodyssey/[email protected]/ag/fn/add.go:32 +0x83
github.com/nlpodyssey/spago/ag.(*Operator).forward(0xc01687cb40)
	/home/alexandre/pkg/mod/github.com/nlpodyssey/[email protected]/ag/operator.go:191 +0x2e
created by github.com/nlpodyssey/spago/ag.NewOperator
	/home/alexandre/pkg/mod/github.com/nlpodyssey/[email protected]/ag/operator.go:58 +0xee
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x40 pc=0x63cd47]

goroutine 1122 [running]:
github.com/nlpodyssey/spago/ag.Node.Value({0x0?, 0x0?})
	<autogenerated>:1 +0x27
github.com/nlpodyssey/spago/ag/fn.(*Add[...]).Forward(0xc8be40)
	/home/alexandre/pkg/mod/github.com/nlpodyssey/[email protected]/ag/fn/add.go:32 +0x83
github.com/nlpodyssey/spago/ag.(*Operator).forward(0xc01687ca00)
	/home/alexandre/pkg/mod/github.com/nlpodyssey/[email protected]/ag/operator.go:191 +0x2e
created by github.com/nlpodyssey/spago/ag.NewOperator
	/home/alexandre/pkg/mod/github.com/nlpodyssey/[email protected]/ag/operator.go:58 +0xee
exit status 2

result, err := m.Answer(context.Background(), text, paragraph, opts)

have some limit for size of paragraph?

@matteo-grella
Copy link
Member

Hi @devalexandre yes we are constrained by the positional encoder max 512 token (tokens /= words).

Please update to the latest version and give it a try, it should log the error.

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