I hope I'm not getting ahead of myself, but put together this modest commit to allow for passing in the device to GPT4All. It adds an Option for device, and then passes that in when GPT4All(...) is instantiated.
I went back and forth on the default value for this, if it should be cpu or None, and am submitting this with cpu. Currently, GPT4All uses cpu as its default, and I imagine this is unlikely to change. I considered None, which would then make GPT4All decide how to handle a None - which currently is exactly the same as if it is cpu, and so just using cpu seemed to make more sense.
I tested this for myself, but did not create any actual tests for the library for this. It isn't really clear to me how the testing fake responses are working in there...
Fixes #32
I hope I'm not getting ahead of myself, but put together this modest commit to allow for passing in the device to GPT4All. It adds an Option for device, and then passes that in when GPT4All(...) is instantiated.
I went back and forth on the default value for this, if it should be
cpu
orNone
, and am submitting this withcpu
. Currently, GPT4All usescpu
as its default, and I imagine this is unlikely to change. I consideredNone
, which would then make GPT4All decide how to handle aNone
- which currently is exactly the same as if it iscpu
, and so just usingcpu
seemed to make more sense.I tested this for myself, but did not create any actual tests for the library for this. It isn't really clear to me how the testing fake responses are working in there...