Should be green now.

This commit is contained in:
Nicolas Patry 2023-09-27 10:52:07 +00:00
parent c09eb2f8bf
commit ae0775084a
2 changed files with 11 additions and 11 deletions

View File

@ -33,17 +33,10 @@ Options:
[env: NUM_SHARD=]
--quantize <QUANTIZE>
Whether you want the model to be quantized
Whether you want the model to be quantized. This will use `bitsandbytes` for quantization on the fly, or `gptq`. 4bit quantization is available through `bitsandbytes` by providing the `bitsandbytes-fp4` or `bitsandbytes-nf4` options
[env: QUANTIZE=]
Possible values:
- awq: 4 bit quantization. Requires a specific GTPQ quantized model: https://hf.co/models?search=awq. Should replace GPTQ models whereever possible because of the better latency
- eetq: 8 bit quantization, doesn't require specific model. Should be a drop-in replacement to bitsandbytes with much better performance. Kernels are from https://github.com/NetEase-FuXi/EETQ.git
- gptq: 4 bit quantization. Requires a specific GTPQ quantized model: https://hf.co/models?search=gptq. text-generation-inference will use exllama (faster) kernels whereever possible, and use triton kernel (wider support) when it's not. AWQ has faster kernels
- bitsandbytes: Bitsandbytes 8bit. Can be applied on any model, will cut the memory requirement in half, but it is known that the model will be much slower to run than the native f16
- bitsandbytes-nf4: Bitsandbytes 4bit. Can be applied on any model, will cut the memory requirement by 4x, but it is known that the model will be much slower to run than the native f16
- bitsandbytes-fp4: Bitsandbytes 4bit. nf4 should be preferred in most cases but maybe this one has better perplexity performance for you model
[possible values: bitsandbytes, bitsandbytes-nf4, bitsandbytes-fp4, gptq, awq]
--dtype <DTYPE>
The dtype to be forced upon the model. This option cannot be used with `--quantize`

View File

@ -11,13 +11,20 @@ def main():
output = subprocess.check_output(["text-generation-launcher", "--help"]).decode("utf-8")
final_doc = f"```\n{output}\n```"
filename = "docs/source/basic_tutorials/launcher.md"
if args.check:
with open("docs/source/basic_tutorials/launcher.md", "r") as f:
with open(filename, "r") as f:
doc = f.read()
if doc != final_doc:
tmp = "launcher.md"
with open(tmp, "w") as g:
g.write(final_doc)
diff = subprocess.run(["diff",tmp, filename], capture_output=True).stdout.decode("utf-8")
print(diff)
raise Exception("Doc is not up-to-date, run `python update_doc.py` in order to update it")
else:
with open("docs/source/basic_tutorials/launcher.md", "w") as f:
with open(filename, "w") as f:
f.write(final_doc)
if __name__ == "__main__":