andrijdavid commited on
Commit
f1297b8
1 Parent(s): 86259c1

Upload folder using huggingface_hub

Browse files
Files changed (1) hide show
  1. README.md +0 -198
README.md CHANGED
@@ -210,202 +210,6 @@ Here are guides on using llama-cpp-python and ctransformers with LangChain:
210
  # Original model card: French-Alpaca-Llama3-8B-Instruct-v1.0
211
 
212
 
213
-
214
- # French-Alpaca-Llama3-8B-Instruct-v1.0-GGUF
215
- - Original model: [French-Alpaca-Llama3-8B-Instruct-v1.0](https://huggingface.co/jpacifico/French-Alpaca-Llama3-8B-Instruct-v1.0)
216
-
217
- <!-- description start -->
218
- ## Description
219
-
220
- This repo contains GGUF format model files for [French-Alpaca-Llama3-8B-Instruct-v1.0](https://huggingface.co/jpacifico/French-Alpaca-Llama3-8B-Instruct-v1.0).
221
-
222
- <!-- description end -->
223
- <!-- README_GGUF.md-about-gguf start -->
224
- ### About GGUF
225
- GGUF is a new format introduced by the llama.cpp team on August 21st 2023. It is a replacement for GGML, which is no longer supported by llama.cpp.
226
- Here is an incomplete list of clients and libraries that are known to support GGUF:
227
- * [llama.cpp](https://github.com/ggerganov/llama.cpp). This is the source project for GGUF, providing both a Command Line Interface (CLI) and a server option.
228
- * [text-generation-webui](https://github.com/oobabooga/text-generation-webui), Known as the most widely used web UI, this project boasts numerous features and powerful extensions, and supports GPU acceleration.
229
- * [Ollama](https://github.com/jmorganca/ollama) Ollama is a lightweight and extensible framework designed for building and running language models locally. It features a simple API for creating, managing, and executing models, along with a library of pre-built models for use in various applications​
230
- * [KoboldCpp](https://github.com/LostRuins/koboldcpp), A comprehensive web UI offering GPU acceleration across all platforms and architectures, particularly renowned for storytelling.
231
- * [GPT4All](https://gpt4all.io), This is a free and open source GUI that runs locally, supporting Windows, Linux, and macOS with full GPU acceleration.
232
- * [LM Studio](https://lmstudio.ai/) An intuitive and powerful local GUI for Windows and macOS (Silicon), featuring GPU acceleration.
233
- * [LoLLMS Web UI](https://github.com/ParisNeo/lollms-webui). A notable web UI with a variety of unique features, including a comprehensive model library for easy model selection.
234
- * [Faraday.dev](https://faraday.dev/), An attractive, user-friendly character-based chat GUI for Windows and macOS (both Silicon and Intel), also offering GPU acceleration.
235
- * [llama-cpp-python](https://github.com/abetlen/llama-cpp-python), A Python library equipped with GPU acceleration, LangChain support, and an OpenAI-compatible API server.
236
- * [candle](https://github.com/huggingface/candle), A Rust-based ML framework focusing on performance, including GPU support, and designed for ease of use.
237
- * [ctransformers](https://github.com/marella/ctransformers), A Python library featuring GPU acceleration, LangChain support, and an OpenAI-compatible AI server.
238
- * [localGPT](https://github.com/PromtEngineer/localGPT) An open-source initiative enabling private conversations with documents.
239
- <!-- README_GGUF.md-about-gguf end -->
240
-
241
- <!-- compatibility_gguf start -->
242
- ## Explanation of quantisation methods
243
- <details>
244
- <summary>Click to see details</summary>
245
- The new methods available are:
246
-
247
- * GGML_TYPE_Q2_K - "type-1" 2-bit quantization in super-blocks containing 16 blocks, each block having 16 weight. Block scales and mins are quantized with 4 bits. This ends up effectively using 2.5625 bits per weight (bpw)
248
- * GGML_TYPE_Q3_K - "type-0" 3-bit quantization in super-blocks containing 16 blocks, each block having 16 weights. Scales are quantized with 6 bits. This end up using 3.4375 bpw.
249
- * GGML_TYPE_Q4_K - "type-1" 4-bit quantization in super-blocks containing 8 blocks, each block having 32 weights. Scales and mins are quantized with 6 bits. This ends up using 4.5 bpw.
250
- * GGML_TYPE_Q5_K - "type-1" 5-bit quantization. Same super-block structure as GGML_TYPE_Q4_K resulting in 5.5 bpw
251
- * GGML_TYPE_Q6_K - "type-0" 6-bit quantization. Super-blocks with 16 blocks, each block having 16 weights. Scales are quantized with 8 bits. This ends up using 6.5625 bpw.
252
- </details>
253
- <!-- compatibility_gguf end -->
254
-
255
- <!-- README_GGUF.md-how-to-download start -->
256
- ## How to download GGUF files
257
-
258
- **Note for manual downloaders:** You almost never want to clone the entire repo! Multiple different quantisation formats are provided, and most users only want to pick and download a single folder.
259
-
260
- The following clients/libraries will automatically download models for you, providing a list of available models to choose from:
261
-
262
- * LM Studio
263
- * LoLLMS Web UI
264
- * Faraday.dev
265
-
266
- ### In `text-generation-webui`
267
-
268
- Under Download Model, you can enter the model repo: LiteLLMs/French-Alpaca-Llama3-8B-Instruct-v1.0-GGUF and below it, a specific filename to download, such as: Q4_0/Q4_0-00001-of-00009.gguf.
269
-
270
- Then click Download.
271
-
272
- ### On the command line, including multiple files at once
273
-
274
- I recommend using the `huggingface-hub` Python library:
275
-
276
- ```shell
277
- pip3 install huggingface-hub
278
- ```
279
-
280
- Then you can download any individual model file to the current directory, at high speed, with a command like this:
281
-
282
- ```shell
283
- huggingface-cli download LiteLLMs/French-Alpaca-Llama3-8B-Instruct-v1.0-GGUF Q4_0/Q4_0-00001-of-00009.gguf --local-dir . --local-dir-use-symlinks False
284
- ```
285
-
286
- <details>
287
- <summary>More advanced huggingface-cli download usage (click to read)</summary>
288
-
289
- You can also download multiple files at once with a pattern:
290
-
291
- ```shell
292
- huggingface-cli download LiteLLMs/French-Alpaca-Llama3-8B-Instruct-v1.0-GGUF --local-dir . --local-dir-use-symlinks False --include='*Q4_K*gguf'
293
- ```
294
-
295
- For more documentation on downloading with `huggingface-cli`, please see: [HF -> Hub Python Library -> Download files -> Download from the CLI](https://huggingface.co/docs/huggingface_hub/guides/download#download-from-the-cli).
296
-
297
- To accelerate downloads on fast connections (1Gbit/s or higher), install `hf_transfer`:
298
-
299
- ```shell
300
- pip3 install huggingface_hub[hf_transfer]
301
- ```
302
-
303
- And set environment variable `HF_HUB_ENABLE_HF_TRANSFER` to `1`:
304
-
305
- ```shell
306
- HF_HUB_ENABLE_HF_TRANSFER=1 huggingface-cli download LiteLLMs/French-Alpaca-Llama3-8B-Instruct-v1.0-GGUF Q4_0/Q4_0-00001-of-00009.gguf --local-dir . --local-dir-use-symlinks False
307
- ```
308
-
309
- Windows Command Line users: You can set the environment variable by running `set HF_HUB_ENABLE_HF_TRANSFER=1` before the download command.
310
- </details>
311
- <!-- README_GGUF.md-how-to-download end -->
312
- <!-- README_GGUF.md-how-to-run start -->
313
- ## Example `llama.cpp` command
314
-
315
- Make sure you are using `llama.cpp` from commit [d0cee0d](https://github.com/ggerganov/llama.cpp/commit/d0cee0d36d5be95a0d9088b674dbb27354107221) or later.
316
-
317
- ```shell
318
- ./main -ngl 35 -m Q4_0/Q4_0-00001-of-00009.gguf --color -c 8192 --temp 0.7 --repeat_penalty 1.1 -n -1 -p "<PROMPT>"
319
- ```
320
-
321
- Change `-ngl 32` to the number of layers to offload to GPU. Remove it if you don't have GPU acceleration.
322
-
323
- Change `-c 8192` to the desired sequence length. For extended sequence models - eg 8K, 16K, 32K - the necessary RoPE scaling parameters are read from the GGUF file and set by llama.cpp automatically. Note that longer sequence lengths require much more resources, so you may need to reduce this value.
324
-
325
- If you want to have a chat-style conversation, replace the `-p <PROMPT>` argument with `-i -ins`
326
-
327
- For other parameters and how to use them, please refer to [the llama.cpp documentation](https://github.com/ggerganov/llama.cpp/blob/master/examples/main/README.md)
328
-
329
- ## How to run in `text-generation-webui`
330
-
331
- Further instructions can be found in the text-generation-webui documentation, here: [text-generation-webui/docs/04 ‐ Model Tab.md](https://github.com/oobabooga/text-generation-webui/blob/main/docs/04%20%E2%80%90%20Model%20Tab.md#llamacpp).
332
-
333
- ## How to run from Python code
334
-
335
- You can use GGUF models from Python using the [llama-cpp-python](https://github.com/abetlen/llama-cpp-python) or [ctransformers](https://github.com/marella/ctransformers) libraries. Note that at the time of writing (Nov 27th 2023), ctransformers has not been updated for some time and is not compatible with some recent models. Therefore I recommend you use llama-cpp-python.
336
-
337
- ### How to load this model in Python code, using llama-cpp-python
338
-
339
- For full documentation, please see: [llama-cpp-python docs](https://abetlen.github.io/llama-cpp-python/).
340
-
341
- #### First install the package
342
-
343
- Run one of the following commands, according to your system:
344
-
345
- ```shell
346
- # Base ctransformers with no GPU acceleration
347
- pip install llama-cpp-python
348
- # With NVidia CUDA acceleration
349
- CMAKE_ARGS="-DLLAMA_CUBLAS=on" pip install llama-cpp-python
350
- # Or with OpenBLAS acceleration
351
- CMAKE_ARGS="-DLLAMA_BLAS=ON -DLLAMA_BLAS_VENDOR=OpenBLAS" pip install llama-cpp-python
352
- # Or with CLBLast acceleration
353
- CMAKE_ARGS="-DLLAMA_CLBLAST=on" pip install llama-cpp-python
354
- # Or with AMD ROCm GPU acceleration (Linux only)
355
- CMAKE_ARGS="-DLLAMA_HIPBLAS=on" pip install llama-cpp-python
356
- # Or with Metal GPU acceleration for macOS systems only
357
- CMAKE_ARGS="-DLLAMA_METAL=on" pip install llama-cpp-python
358
- # In windows, to set the variables CMAKE_ARGS in PowerShell, follow this format; eg for NVidia CUDA:
359
- $env:CMAKE_ARGS = "-DLLAMA_OPENBLAS=on"
360
- pip install llama-cpp-python
361
- ```
362
-
363
- #### Simple llama-cpp-python example code
364
-
365
- ```python
366
- from llama_cpp import Llama
367
- # Set gpu_layers to the number of layers to offload to GPU. Set to 0 if no GPU acceleration is available on your system.
368
- llm = Llama(
369
- model_path="./Q4_0/Q4_0-00001-of-00009.gguf", # Download the model file first
370
- n_ctx=32768, # The max sequence length to use - note that longer sequence lengths require much more resources
371
- n_threads=8, # The number of CPU threads to use, tailor to your system and the resulting performance
372
- n_gpu_layers=35 # The number of layers to offload to GPU, if you have GPU acceleration available
373
- )
374
- # Simple inference example
375
- output = llm(
376
- "<PROMPT>", # Prompt
377
- max_tokens=512, # Generate up to 512 tokens
378
- stop=["</s>"], # Example stop token - not necessarily correct for this specific model! Please check before using.
379
- echo=True # Whether to echo the prompt
380
- )
381
- # Chat Completion API
382
- llm = Llama(model_path="./Q4_0/Q4_0-00001-of-00009.gguf", chat_format="llama-2") # Set chat_format according to the model you are using
383
- llm.create_chat_completion(
384
- messages = [
385
- {"role": "system", "content": "You are a story writing assistant."},
386
- {
387
- "role": "user",
388
- "content": "Write a story about llamas."
389
- }
390
- ]
391
- )
392
- ```
393
-
394
- ## How to use with LangChain
395
-
396
- Here are guides on using llama-cpp-python and ctransformers with LangChain:
397
-
398
- * [LangChain + llama-cpp-python](https://python.langchain.com/docs/integrations/llms/llamacpp)
399
- * [LangChain + ctransformers](https://python.langchain.com/docs/integrations/providers/ctransformers)
400
-
401
- <!-- README_GGUF.md-how-to-run end -->
402
-
403
- <!-- footer end -->
404
-
405
- <!-- original-model-card start -->
406
- # Original model card: French-Alpaca-Llama3-8B-Instruct-v1.0
407
-
408
-
409
  ## Model Card for Model ID
410
 
411
  French-Alpaca based on Llama3-8B-Instruct
@@ -455,5 +259,3 @@ It does not have any moderation mechanisms.
455
  - **License:** MIT
456
 
457
  <!-- original-model-card end -->
458
-
459
- <!-- original-model-card end -->
 
210
  # Original model card: French-Alpaca-Llama3-8B-Instruct-v1.0
211
 
212
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
213
  ## Model Card for Model ID
214
 
215
  French-Alpaca based on Llama3-8B-Instruct
 
259
  - **License:** MIT
260
 
261
  <!-- original-model-card end -->