-
Notifications
You must be signed in to change notification settings - Fork 1k
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
[Feature request] Implement GPT-JT #6
Comments
Well this looks like the same model as GPT-J, just different weights. You should already be able to run it - just convert it to |
Ok, converted these weights from GPT-JT and it generated the model file, however I'm getting the following error when loading:
any ideas? |
The convert script assumes that the original weights are FP32 and converts to FP16 when necessary. Try changing the following: ggml/examples/gpt-j/convert-h5-to-ggml.py Lines 118 to 121 in 90ee5c6
to: # ftype == 0 -> float32, ftype == 1 -> float16
ftype = 0;
if use_f16:
if name[-7:] == ".weight" and n_dims == 2:
print(" Converting to float16")
data = data.astype(np.float16)
ftype = 1
else:
print(" Converting to float32")
data = data.astype(np.float32)
ftype = 0 |
Just tested and it works: ed09c71 Also fixed unicode support for the GPT-2 and GPT-J models in general |
@pablogranolabar Is there a noticeable difference in quality of output of GPT-JT compared to GPT-J? |
Yes and no, it's getting a lot of conflicting reviews because GPT-JT is fine tuned for task oriented stuff like chain of thought reasoning. So for canned general tasks like causal LM it's potentially worse in whatever you would consider precision and accuracy, but with quality prompt engineering all of these additional tasks can be teased out during inference. So, the inevitable "it depends" is applicable there, depending on target architecture, model handler customization, and inference hyperparameters + prompt injection and optimization during inference. |
Would be awesome if you could share some sample outputs. If there is a way to share large models, I'd be willing to convert it to ggml and share. Maybe IPFS or Torrent, have to figure out. I have bandwidth caps on server. |
@pablogranolabar Thanks for sharing the great idea about using GPT-JT @ggerganov Thanks for the fix I uploaded the model to huggingface so that its easy for people to get hold of the gpt-jt ggml model variant without eating into your hosting bills: https://huggingface.co/trholding/GPT-JT-6B-v1-ggml
|
probably best suited for a new issue, but @ggerganov what do you think about adding 8-bit inference? this would further cut model memory consumption by 50% and with nominal loss of precision. this is a supported option now for transformers with bitsandbytes via Accelerate. |
@pablogranolabar |
Yeah for example: huggingface/transformers#17901 |
Again, I might be missing something, but it seems this refers to huggingface/accelerate framework which is all CUDA and does not apply to Apple Accelerate. Unless there is a way to use Apple framework with direct 8-bit precision support, I think 8-bit support will be very low priority for ggml. It means I will have to implement the quantization from scratch with NEON and I'm not really sure how to do this atm. And even if I achieve it, it will very likely be less performant compared to the existing mixed FP16/FP32 + Accelerate because we will lose the AMX coprocessor benefits that we currently have. |
Ah sorry I was referring to the Accelerate framework used with PyTorch. Here's a decent writeup of their 8-bit quantization methods: https://huggingface.co/blog/hf-bitsandbytes-integration |
@trholding - your model link gives a 404. Is the GPT-6JT ggml still available anywhere? |
e.g. https://www.together.xyz/blog/releasing-v1-of-gpt-jt-powered-by-open-source-ai
The text was updated successfully, but these errors were encountered: