Triangle104 commited on
Commit
fa41b85
·
verified ·
1 Parent(s): e333860

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +48 -0
README.md CHANGED
@@ -13,6 +13,54 @@ base_model: ibm-granite/granite-3.1-8b-base
13
  This model was converted to GGUF format from [`ibm-granite/granite-3.1-8b-base`](https://huggingface.co/ibm-granite/granite-3.1-8b-base) using llama.cpp via the ggml.ai's [GGUF-my-repo](https://huggingface.co/spaces/ggml-org/gguf-my-repo) space.
14
  Refer to the [original model card](https://huggingface.co/ibm-granite/granite-3.1-8b-base) for more details on the model.
15
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
16
  ## Use with llama.cpp
17
  Install llama.cpp through brew (works on Mac and Linux)
18
 
 
13
  This model was converted to GGUF format from [`ibm-granite/granite-3.1-8b-base`](https://huggingface.co/ibm-granite/granite-3.1-8b-base) using llama.cpp via the ggml.ai's [GGUF-my-repo](https://huggingface.co/spaces/ggml-org/gguf-my-repo) space.
14
  Refer to the [original model card](https://huggingface.co/ibm-granite/granite-3.1-8b-base) for more details on the model.
15
 
16
+ ---
17
+ Model details:
18
+ -
19
+ Granite-3.1-8B-Base extends the context length of Granite-3.0-8B-Base from 4K to 128K using a progressive training strategy by increasing the supported context length in increments while adjusting RoPE theta until the model has successfully adapted to desired length of 128K. This long-context pre-training stage was performed using approximately 500B tokens.
20
+
21
+ Developers: Granite Team, IBM
22
+ GitHub Repository: ibm-granite/granite-3.1-language-models
23
+ Website: Granite Docs
24
+ Paper: Granite 3.1 Language Models (coming soon)
25
+ Release Date: December 18th, 2024
26
+ License: Apache 2.0
27
+
28
+ Supported Languages: English, German, Spanish, French, Japanese, Portuguese, Arabic, Czech, Italian, Korean, Dutch, and Chinese. Users may finetune Granite 3.1 models for languages beyond these 12 languages.
29
+
30
+ Intended Use: Prominent use cases of LLMs in text-to-text generation include summarization, text classification, extraction, question-answering, and other long-context tasks. All Granite Base models are able to handle these tasks as they were trained on a large amount of data from various domains. Moreover, they can serve as baseline to create specialized models for specific application scenarios.
31
+
32
+ Generation: This is a simple example of how to use Granite-3.1-8B-Base model.
33
+
34
+ Install the following libraries:
35
+
36
+ pip install torch torchvision torchaudio
37
+ pip install accelerate
38
+ pip install transformers
39
+
40
+ Then, copy the code snippet below to run the example.
41
+
42
+ from transformers import AutoModelForCausalLM, AutoTokenizer
43
+ device = "auto"
44
+ model_path = "ibm-granite/granite-3.1-8B-base"
45
+ tokenizer = AutoTokenizer.from_pretrained(model_path)
46
+ # drop device_map if running on CPU
47
+ model = AutoModelForCausalLM.from_pretrained(model_path, device_map=device)
48
+ model.eval()
49
+ # change input text as desired
50
+ input_text = "Where is the Thomas J. Watson Research Center located?"
51
+ # tokenize the text
52
+ input_tokens = tokenizer(input_text, return_tensors="pt").to(device)
53
+ # generate output tokens
54
+ output = model.generate(**input_tokens,
55
+ max_length=4000)
56
+ # decode output tokens into text
57
+ output = tokenizer.batch_decode(output)
58
+ # print output
59
+ print(output)
60
+
61
+ Model Architecture: Granite-3.1-8B-Base is based on a decoder-only dense transformer architecture. Core components of this architecture are: GQA and RoPE, MLP with SwiGLU, RMSNorm, and shared input/output embeddings.
62
+
63
+ ---
64
  ## Use with llama.cpp
65
  Install llama.cpp through brew (works on Mac and Linux)
66