Buckets:
| import{s as Ce,o as Be,n as Fe}from"../chunks/scheduler.85c25b89.js";import{S as Ve,i as xe,g as u,s as l,r,A as Re,h,f as n,c as a,j as ge,u as i,x as b,k as we,y as g,a as o,v as p,d as c,t as d,w as m}from"../chunks/index.c9bcf812.js";import{T as ke}from"../chunks/Tip.d8f753fa.js";import{D as Ne}from"../chunks/Docstring.e86a2d02.js";import{C as be}from"../chunks/CodeBlock.c004bd26.js";import{H as w}from"../chunks/getInferenceSnippets.5ea0a804.js";function Ee(L){let s,j="Execute <code>optimum-cli export neuron --help</code> to display all command line options and their description.";return{c(){s=u("p"),s.innerHTML=j},l(y){s=h(y,"P",{"data-svelte-h":!0}),b(s)!=="svelte-1nu66vu"&&(s.innerHTML=j)},m(y,q){o(y,s,q)},p:Fe,d(y){y&&n(s)}}}function ze(L){let s,j,y,q,_,P,W,D,$,We='<a href="https://hf.co/papers/2212.04356" rel="nofollow">Whisper</a> is a encoder-decoder (sequence-to-sequence) transformer pretrained on 680,000 hours of labeled audio data. This amount of pretraining data enables zero-shot performance on audio tasks in English and many other languages. The decoder allows Whisper to map the encoders learned speech representations to useful outputs, such as text, without additional fine-tuning. Whisper just works out of the box.',O,U,$e='You can find all the original Whisper checkpoints under the <a href="https://huggingface.co/collections/openai/whisper-release-6501bba2cf999715fd953013" rel="nofollow">Whisper</a> collection.',K,G,ee,v,Ue='To deploy 🤗 <a href="https://huggingface.co/docs/transformers/index" rel="nofollow">Transformers</a> models on Neuron devices, you first need to compile the models and export them to a serialized format for inference. Below are two approaches to compile the model, you can choose the one that best suits your needs:',te,X,ne,Z,Ge="You can export the model using the Optimum command-line interface as follows:",oe,I,le,J,ae,N,se,C,re,B,ie,F,ve='To use the model that we just exported, there are two options. We can eithe use the <a href="/docs/optimum.neuron/v0.3.0/en/model_doc/transformers/whisper#optimum.neuron.NeuronWhisperForConditionalGeneration">NeuronWhisperForConditionalGeneration</a> class or use the <code>Pipeline</code>. The example below demonstrates how to automatically transcribe speech into text these two approaches.',pe,V,ce,x,de,R,me,k,ue,E,he,f,z,Je,H,Xe="Whisper Neuron model with a language modeling head that can be used for automatic speech recognition.",Te,S,Ze=`This model inherits from <code>~neuron.modeling.NeuronTracedModel</code>. Check the superclass documentation for the generic methods the | |
| library implements for all its model (such as downloading or saving)`,je,T,Y,_e,Q,Ie="The <code>NeuronWhisperForConditionalGeneration</code> forward method, overrides the <code>__call__</code> special method. Accepts only the inputs traced during the compilation step. Any additional inputs provided during inference will be ignored. To include extra inputs, recompile the model with those inputs specified.",fe,A,ye;return _=new w({props:{title:"Whisper",local:"whisper",headingTag:"h1"}}),W=new w({props:{title:"Overview",local:"overview",headingTag:"h2"}}),G=new w({props:{title:"Export to Neuron",local:"export-to-neuron",headingTag:"h2"}}),X=new w({props:{title:"Option 1: CLI",local:"option-1-cli",headingTag:"h3"}}),I=new be({props:{code:"b3B0aW11bS1jbGklMjBleHBvcnQlMjBuZXVyb24lMjAtLW1vZGVsJTIwb3BlbmFpJTJGd2hpc3Blci10aW55JTIwLS10YXNrJTIwYXV0b21hdGljLXNwZWVjaC1yZWNvZ25pdGlvbiUyMC0tYmF0Y2hfc2l6ZSUyMDElMjAtLXNlcXVlbmNlX2xlbmd0aCUyMDEyOCUyMC0tYXV0b19jYXN0JTIwYWxsJTIwLS1hdXRvX2Nhc3RfdHlwZSUyMGJmMTYlMjB3aGlzcGVyX3RpbnlfbmV1cm9ueCUyRg==",highlighted:'optimum-cli <span class="hljs-built_in">export</span> neuron --model openai/whisper-tiny --task automatic-speech-recognition --batch_size 1 --sequence_length 128 --auto_cast all --auto_cast_type bf16 whisper_tiny_neuronx/',wrap:!1}}),J=new ke({props:{warning:!1,$$slots:{default:[Ee]},$$scope:{ctx:L}}}),N=new w({props:{title:"Option 2: Python API",local:"option-2-python-api",headingTag:"h3"}}),C=new be({props:{code:"ZnJvbSUyMG9wdGltdW0ubmV1cm9uJTIwaW1wb3J0JTIwTmV1cm9uV2hpc3BlckZvckNvbmRpdGlvbmFsR2VuZX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fdGlueV9uZXVyb254JTIyJTBBKQ==",highlighted:`<span class="hljs-keyword">from</span> optimum.neuron <span class="hljs-keyword">import</span> NeuronWhisperForConditionalGeneration | |
| compiler_args = {<span class="hljs-string">"auto_cast"</span>: <span class="hljs-string">"all"</span>, <span class="hljs-string">"auto_cast_type"</span>: <span class="hljs-string">"bf16"</span>} | |
| input_shapes = {<span class="hljs-string">"batch_size"</span>: <span class="hljs-number">1</span>, <span class="hljs-string">"sequence_length"</span>: <span class="hljs-number">128</span>} | |
| neuron_model = NeuronWhisperForConditionalGeneration.from_pretrained( | |
| <span class="hljs-string">"openai/whisper-tiny"</span>, | |
| export=<span class="hljs-literal">True</span>, | |
| inline_weights_to_neff=<span class="hljs-literal">False</span>, | |
| **compiler_args, | |
| **input_shapes, | |
| ) | |
| <span class="hljs-comment"># Save locally</span> | |
| neuron_model.save_pretrained(<span class="hljs-string">"whisper_tiny_neuronx"</span>) | |
| <span class="hljs-comment"># Upload to the HuggingFace Hub</span> | |
| neuron_model.push_to_hub( | |
| <span class="hljs-string">"whisper_tiny_neuronx"</span>, repository_id=<span class="hljs-string">"my-neuron-repo"</span> <span class="hljs-comment"># Replace with your repo id, eg. "Jingya/whisper_tiny_neuronx"</span> | |
| )`,wrap:!1}}),B=new w({props:{title:"Usage Example",local:"usage-example",headingTag:"h2"}}),V=new w({props:{title:"With NeuronWhisperForConditionalGeneration",local:"with-neuronwhisperforconditionalgeneration",headingTag:"h3"}}),x=new be({props:{code:"ZnJvbSUyMGRhdGFzZXRzJTIwaW1wb3J0JTIwbG9hZF9kYXRhc2V0JTBBZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9Qcm9jZXNzb3IlMEFmcm9tJTIwb3B0aW11bS5uZXVyb24lMjBpbXBvcnQlMjBOZXVyb25XaGlzcGVyRm9yQ29uZGl0aW9uYWxHZW5lcmF0aW9uJTBBJTBBJTIzJTIwU2VsZWN0JTIwYW4lMjBhdWRpbyUyMGZpbGUlMjB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Y29kZShwcmVkaWN0ZWRfaWRzJTJDJTIwc2tpcF9zcGVjaWFsX3Rva2VucyUzRFRydWUpJTBBJTIzJTIwJTIwTXIuJTIwUXVpbHRlciUyMGlzJTIwdGhlJTIwYXBvc3RsZSUyMG9mJTIwdGhlJTIwbWlkZGxlJTIwY2xhc3NlcyUyMGFuZCUyMHdlJTIwYXJlJTIwZ2xhZCUyMHRvJTIwd2VsY29tZSUyMGhpcyUyMGdvc3BlbC4=",highlighted:`<span class="hljs-keyword">from</span> datasets <span class="hljs-keyword">import</span> load_dataset | |
| <span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoProcessor | |
| <span class="hljs-keyword">from</span> optimum.neuron <span class="hljs-keyword">import</span> NeuronWhisperForConditionalGeneration | |
| <span class="hljs-comment"># Select an audio file and read it:</span> | |
| ds = load_dataset(<span class="hljs-string">"hf-internal-testing/librispeech_asr_dummy"</span>, <span class="hljs-string">"clean"</span>, split=<span class="hljs-string">"validation"</span>) | |
| audio_sample = ds[<span class="hljs-number">0</span>][<span class="hljs-string">"audio"</span>] | |
| <span class="hljs-comment"># Use the model and processor to transcribe the audio:</span> | |
| processor = AutoProcessor.from_pretrained(<span class="hljs-string">"Jingya/whisper_tiny_neuronx"</span>) | |
| input_features = processor( | |
| audio_sample[<span class="hljs-string">"array"</span>], sampling_rate=audio_sample[<span class="hljs-string">"sampling_rate"</span>], return_tensors=<span class="hljs-string">"pt"</span> | |
| ).input_features | |
| <span class="hljs-comment"># Inference</span> | |
| neuron_model = NeuronWhisperForConditionalGeneration.from_pretrained(<span class="hljs-string">"Jingya/whisper_tiny_neuronx"</span>) | |
| predicted_ids = neuron_model.generate(input_features) | |
| transcription = processor.batch_decode(predicted_ids, skip_special_tokens=<span class="hljs-literal">True</span>) | |
| <span class="hljs-comment"># Mr. Quilter is the apostle of the middle classes and we are glad to welcome his gospel.</span>`,wrap:!1}}),R=new w({props:{title:"With pipeline",local:"with-pipeline",headingTag:"h3"}}),k=new be({props:{code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lMjB0aGUlMjB0cnVlJTIwbWVhbmluZyUyMG9mJTIwaXRzJTIwZHJlYW0u",highlighted:`<span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoProcessor | |
| <span class="hljs-keyword">from</span> optimum.neuron <span class="hljs-keyword">import</span> NeuronWhisperForConditionalGeneration, pipeline | |
| processor = AutoProcessor.from_pretrained(<span class="hljs-string">"Jingya/whisper_tiny_neuronx"</span>) | |
| neuron_model = NeuronWhisperForConditionalGeneration.from_pretrained(<span class="hljs-string">"Jingya/whisper_tiny_neuronx"</span>) | |
| pipeline = pipeline( | |
| task=<span class="hljs-string">"automatic-speech-recognition"</span>, | |
| model=neuron_model, | |
| tokenizer=processor.tokenizer, | |
| feature_extractor=processor.feature_extractor, | |
| ) | |
| pipeline(<span class="hljs-string">"https://huggingface.co/datasets/Narsil/asr_dummy/resolve/main/mlk.flac"</span>) | |
| <span class="hljs-comment"># I have a dream. Good one day. This nation will rise up. Live out the true meaning of its dream.</span>`,wrap:!1}}),E=new w({props:{title:"NeuronWhisperForConditionalGeneration",local:"optimum.neuron.NeuronWhisperForConditionalGeneration",headingTag:"h2"}}),z=new Ne({props:{name:"class optimum.neuron.NeuronWhisperForConditionalGeneration",anchor:"optimum.neuron.NeuronWhisperForConditionalGeneration",parameters:[{name:"encoder",val:": ScriptModule"},{name:"decoder",val:": ScriptModule"},{name:"config",val:": PretrainedConfig"},{name:"model_save_dir",val:": str | pathlib.Path | tempfile.TemporaryDirectory | None = None"},{name:"encoder_file_name",val:": str | None = 'model.neuron'"},{name:"decoder_file_name",val:": str | None = 'model.neuron'"},{name:"preprocessors",val:": list | None = None"},{name:"neuron_configs",val:": dict[str, 'NeuronDefaultConfig'] | None = None"},{name:"configs",val:": dict[str, 'PretrainedConfig'] | None = None"},{name:"generation_config",val:": transformers.generation.configuration_utils.GenerationConfig | None = None"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"optimum.neuron.NeuronWhisperForConditionalGeneration.encoder",description:'<strong>encoder</strong> (<code>torch.jit._script.ScriptModule</code>) — <a href="https://pytorch.org/docs/stable/generated/torch.jit.ScriptModule.html" rel="nofollow">torch.jit._script.ScriptModule</a> is the TorchScript module of the encoder with embedded NEFF(Neuron Executable File Format) compiled by neuron(x) compiler.',name:"encoder"},{anchor:"optimum.neuron.NeuronWhisperForConditionalGeneration.decoder",description:'<strong>decoder</strong> (<code>torch.jit._script.ScriptModule</code>) — <a href="https://pytorch.org/docs/stable/generated/torch.jit.ScriptModule.html" rel="nofollow">torch.jit._script.ScriptModule</a> is the TorchScript module of the decoder with embedded NEFF(Neuron Executable File Format) compiled by neuron(x) compiler.',name:"decoder"},{anchor:"optimum.neuron.NeuronWhisperForConditionalGeneration.config",description:`<strong>config</strong> (<code>transformers.PretrainedConfig</code>) — <a href="https://huggingface.co/docs/transformers/main_classes/configuration#transformers.PretrainedConfig" rel="nofollow">PretrainedConfig</a> is the Model configuration class with all the parameters of the model. | |
| Initializing with a config file does not load the weights associated with the model, only the | |
| configuration. Check out the <code>optimum.neuron.modeling.NeuronTracedModel.from_pretrained</code> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/optimum-neuron/blob/v0.3.0/optimum/neuron/models/inference/whisper/modeling_whisper.py#L126"}}),Y=new Ne({props:{name:"forward",anchor:"optimum.neuron.NeuronWhisperForConditionalGeneration.forward",parameters:[{name:"input_features",val:": torch.FloatTensor | None = None"},{name:"decoder_input_ids",val:": torch.LongTensor | None = None"},{name:"encoder_outputs",val:": tuple[torch.FloatTensor] | None = None"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"optimum.neuron.NeuronWhisperForConditionalGeneration.forward.input_features",description:`<strong>input_features</strong> (<code>torch.FloatTensor | None</code> of shape <code>(batch_size, feature_size, sequence_length)</code>) — | |
| Float values mel features extracted from the raw speech waveform. Raw speech waveform can be obtained by | |
| loading a <code>.flac</code> or <code>.wav</code> audio file into an array of type <code>list[float]</code> or a <code>numpy.ndarray</code>, <em>e.g.</em> via | |
| the soundfile library (<code>pip install soundfile</code>). To prepare the array into <code>input_features</code>, the | |
| <code>AutoFeatureExtractor</code> should be used for extracting the mel features, padding and conversion into a | |
| tensor of type <code>torch.FloatTensor</code>. See <code>~WhisperFeatureExtractor.__call__</code>`,name:"input_features"},{anchor:"optimum.neuron.NeuronWhisperForConditionalGeneration.forward.decoder_input_ids",description:`<strong>decoder_input_ids</strong> (<code>torch.LongTensor | None</code> of shape <code>(batch_size, max_sequence_length)</code>) — | |
| Indices of decoder input sequence tokens in the vocabulary. Indices can be obtained using <code>WhisperTokenizer</code>. | |
| See <code>PreTrainedTokenizer.encode</code> and <code>PreTrainedTokenizer.__call__</code> for details. Since the cache is not yet | |
| supported for Whisper, it needs to be padded to the <code>sequence_length</code> used for the compilation.`,name:"decoder_input_ids"},{anchor:"optimum.neuron.NeuronWhisperForConditionalGeneration.forward.encoder_outputs",description:`<strong>encoder_outputs</strong> (<code>tuple[torch.FloatTensor | None]</code>) — | |
| Tuple consists of <code>last_hidden_state</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>) is a sequence of | |
| hidden-states at the output of the last layer of the encoder. Used in the cross-attention of the decoder.`,name:"encoder_outputs"}],source:"https://github.com/huggingface/optimum-neuron/blob/v0.3.0/optimum/neuron/models/inference/whisper/modeling_whisper.py#L190"}}),{c(){s=u("meta"),j=l(),y=u("p"),q=l(),r(_.$$.fragment),P=l(),r(W.$$.fragment),D=l(),$=u("p"),$.innerHTML=We,O=l(),U=u("p"),U.innerHTML=$e,K=l(),r(G.$$.fragment),ee=l(),v=u("p"),v.innerHTML=Ue,te=l(),r(X.$$.fragment),ne=l(),Z=u("p"),Z.textContent=Ge,oe=l(),r(I.$$.fragment),le=l(),r(J.$$.fragment),ae=l(),r(N.$$.fragment),se=l(),r(C.$$.fragment),re=l(),r(B.$$.fragment),ie=l(),F=u("p"),F.innerHTML=ve,pe=l(),r(V.$$.fragment),ce=l(),r(x.$$.fragment),de=l(),r(R.$$.fragment),me=l(),r(k.$$.fragment),ue=l(),r(E.$$.fragment),he=l(),f=u("div"),r(z.$$.fragment),Je=l(),H=u("p"),H.textContent=Xe,Te=l(),S=u("p"),S.innerHTML=Ze,je=l(),T=u("div"),r(Y.$$.fragment),_e=l(),Q=u("p"),Q.innerHTML=Ie,fe=l(),A=u("p"),this.h()},l(e){const t=Re("svelte-u9bgzb",document.head);s=h(t,"META",{name:!0,content:!0}),t.forEach(n),j=a(e),y=h(e,"P",{}),ge(y).forEach(n),q=a(e),i(_.$$.fragment,e),P=a(e),i(W.$$.fragment,e),D=a(e),$=h(e,"P",{"data-svelte-h":!0}),b($)!=="svelte-ol5v1p"&&($.innerHTML=We),O=a(e),U=h(e,"P",{"data-svelte-h":!0}),b(U)!=="svelte-1gesilh"&&(U.innerHTML=$e),K=a(e),i(G.$$.fragment,e),ee=a(e),v=h(e,"P",{"data-svelte-h":!0}),b(v)!=="svelte-1dzuv4l"&&(v.innerHTML=Ue),te=a(e),i(X.$$.fragment,e),ne=a(e),Z=h(e,"P",{"data-svelte-h":!0}),b(Z)!=="svelte-87nkn2"&&(Z.textContent=Ge),oe=a(e),i(I.$$.fragment,e),le=a(e),i(J.$$.fragment,e),ae=a(e),i(N.$$.fragment,e),se=a(e),i(C.$$.fragment,e),re=a(e),i(B.$$.fragment,e),ie=a(e),F=h(e,"P",{"data-svelte-h":!0}),b(F)!=="svelte-v4ddn"&&(F.innerHTML=ve),pe=a(e),i(V.$$.fragment,e),ce=a(e),i(x.$$.fragment,e),de=a(e),i(R.$$.fragment,e),me=a(e),i(k.$$.fragment,e),ue=a(e),i(E.$$.fragment,e),he=a(e),f=h(e,"DIV",{class:!0});var M=ge(f);i(z.$$.fragment,M),Je=a(M),H=h(M,"P",{"data-svelte-h":!0}),b(H)!=="svelte-194xg64"&&(H.textContent=Xe),Te=a(M),S=h(M,"P",{"data-svelte-h":!0}),b(S)!=="svelte-t21i2g"&&(S.innerHTML=Ze),je=a(M),T=h(M,"DIV",{class:!0});var Me=ge(T);i(Y.$$.fragment,Me),_e=a(Me),Q=h(Me,"P",{"data-svelte-h":!0}),b(Q)!=="svelte-zrj3de"&&(Q.innerHTML=Ie),Me.forEach(n),M.forEach(n),fe=a(e),A=h(e,"P",{}),ge(A).forEach(n),this.h()},h(){we(s,"name","hf:doc:metadata"),we(s,"content",Ye),we(T,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),we(f,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8")},m(e,t){g(document.head,s),o(e,j,t),o(e,y,t),o(e,q,t),p(_,e,t),o(e,P,t),p(W,e,t),o(e,D,t),o(e,$,t),o(e,O,t),o(e,U,t),o(e,K,t),p(G,e,t),o(e,ee,t),o(e,v,t),o(e,te,t),p(X,e,t),o(e,ne,t),o(e,Z,t),o(e,oe,t),p(I,e,t),o(e,le,t),p(J,e,t),o(e,ae,t),p(N,e,t),o(e,se,t),p(C,e,t),o(e,re,t),p(B,e,t),o(e,ie,t),o(e,F,t),o(e,pe,t),p(V,e,t),o(e,ce,t),p(x,e,t),o(e,de,t),p(R,e,t),o(e,me,t),p(k,e,t),o(e,ue,t),p(E,e,t),o(e,he,t),o(e,f,t),p(z,f,null),g(f,Je),g(f,H),g(f,Te),g(f,S),g(f,je),g(f,T),p(Y,T,null),g(T,_e),g(T,Q),o(e,fe,t),o(e,A,t),ye=!0},p(e,[t]){const M={};t&2&&(M.$$scope={dirty:t,ctx:e}),J.$set(M)},i(e){ye||(c(_.$$.fragment,e),c(W.$$.fragment,e),c(G.$$.fragment,e),c(X.$$.fragment,e),c(I.$$.fragment,e),c(J.$$.fragment,e),c(N.$$.fragment,e),c(C.$$.fragment,e),c(B.$$.fragment,e),c(V.$$.fragment,e),c(x.$$.fragment,e),c(R.$$.fragment,e),c(k.$$.fragment,e),c(E.$$.fragment,e),c(z.$$.fragment,e),c(Y.$$.fragment,e),ye=!0)},o(e){d(_.$$.fragment,e),d(W.$$.fragment,e),d(G.$$.fragment,e),d(X.$$.fragment,e),d(I.$$.fragment,e),d(J.$$.fragment,e),d(N.$$.fragment,e),d(C.$$.fragment,e),d(B.$$.fragment,e),d(V.$$.fragment,e),d(x.$$.fragment,e),d(R.$$.fragment,e),d(k.$$.fragment,e),d(E.$$.fragment,e),d(z.$$.fragment,e),d(Y.$$.fragment,e),ye=!1},d(e){e&&(n(j),n(y),n(q),n(P),n(D),n($),n(O),n(U),n(K),n(ee),n(v),n(te),n(ne),n(Z),n(oe),n(le),n(ae),n(se),n(re),n(ie),n(F),n(pe),n(ce),n(de),n(me),n(ue),n(he),n(f),n(fe),n(A)),n(s),m(_,e),m(W,e),m(G,e),m(X,e),m(I,e),m(J,e),m(N,e),m(C,e),m(B,e),m(V,e),m(x,e),m(R,e),m(k,e),m(E,e),m(z),m(Y)}}}const Ye='{"title":"Whisper","local":"whisper","sections":[{"title":"Overview","local":"overview","sections":[],"depth":2},{"title":"Export to Neuron","local":"export-to-neuron","sections":[{"title":"Option 1: CLI","local":"option-1-cli","sections":[],"depth":3},{"title":"Option 2: Python API","local":"option-2-python-api","sections":[],"depth":3}],"depth":2},{"title":"Usage Example","local":"usage-example","sections":[{"title":"With NeuronWhisperForConditionalGeneration","local":"with-neuronwhisperforconditionalgeneration","sections":[],"depth":3},{"title":"With pipeline","local":"with-pipeline","sections":[],"depth":3}],"depth":2},{"title":"NeuronWhisperForConditionalGeneration","local":"optimum.neuron.NeuronWhisperForConditionalGeneration","sections":[],"depth":2}],"depth":1}';function qe(L){return Be(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class De extends Ve{constructor(s){super(),xe(this,s,qe,ze,Ce,{})}}export{De as component}; | |
Xet Storage Details
- Size:
- 22.3 kB
- Xet hash:
- 4ff7a6b27566719ef40827ad282282714d598b6d8008f46fdfe9bfaa59fa2ca9
·
Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.